Re: 'replication checkpoint has wrong magic' on the newly cloned replicas

From: Oleksii Kliukin <oleksii(at)fastmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: 'replication checkpoint has wrong magic' on the newly cloned replicas
Date: 2017-11-29 17:41:24
Message-ID: CFFC01E6-FE97-4490-8D39-903BB910AB85@fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Stephen,

> On 29. Nov 2017, at 15:54, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>
> Greetings,
>
> * Alex Kliukin (alexk(at)hintbits(dot)com) wrote:
>> The cloning itself is done by copying a compressed image via ssh,
>> running the
>> following command from the replica:
>>
>> """ssh {master} 'cd {master_datadir} && tar -lcp --exclude "*.conf" \
>> --exclude "recovery.done" \
>> --exclude "pacemaker_instanz" \
>> --exclude "dont_start" \
>> --exclude "pg_log" \
>> --exclude "pg_xlog" \
>> --exclude "postmaster.pid" \
>> --exclude "recovery.done" \
>> * | pigz -1 -p 4' | pigz -d -p 4 | tar -xpmUv -C
>> {slave_datadir}""
>>
>> The WAL archiving starts before the copy starts, as the script that
>> clones the
>> replica checks that the WALs archiving is running before the cloning.
>
> Maybe you've doing it and haven't mentioned it, but you have to use
> pg_start/stop_backup

Sorry for not mentioning it, as it seemed obvious, but we are calling pg_start_backup and pg_stop_backup at the right time.

Cheers,
Alex

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Stephen Frost 2017-11-29 17:52:18 Re: 'replication checkpoint has wrong magic' on the newly cloned replicas
Previous Message Stephen Frost 2017-11-29 14:54:55 Re: 'replication checkpoint has wrong magic' on the newly cloned replicas