Re: can we avoid pg_basebackup on planned switches? - Mailing list pgsql-general

From Ben Chobot
Subject Re: can we avoid pg_basebackup on planned switches?
Date
Msg-id 973E2EF5-C058-48A0-AA8F-E7D1CE0F3A6C@silentmedia.com
Whole thread Raw
In response to Re: can we avoid pg_basebackup on planned switches?  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-general
On Aug 7, 2012, at 9:32 AM, Fujii Masao wrote:

> On Mon, Aug 6, 2012 at 3:29 AM, Ben Chobot <bench@silentmedia.com> wrote:
>>
>> Oh, I would have though that doing a clean shutdown of the old master (step 1) would have made sure that all the
unstreamedwal records would be flushed to any connected slaves as part of the master shutting down. In retrospect, I
don'tremember reading that anywhere, so I must have made that up because I wanted it to be that way. Is it wishful
thinking?
>
> When clean shutdown is requested, the master sends all WAL records to
> the standby,
> but it doesn't wait for the standby to receive them. So there is no
> guarantee that all WAL
> records have been flushed to the standby. Walreceiver process in the
> standby might
> detect the termination of replication connection and exit before
> receiving all WAL records.
> Unfortunately I've encountered that case some times.


Oh, I see. Well, that's unfortunate. Thanks for the help though! It shouldn't be too hard to script up what you
suggest.

pgsql-general by date:

Previous
From: David Greco
Date:
Subject: Re: Feature Request - Postgres FDW
Next
From: Sergey Konoplev
Date:
Subject: Re: can we avoid pg_basebackup on planned switches?