Re: [GENERAL] pg_rewind - restore new slave failed to startup during recovery - Mailing list pgsql-general

From Magnus Hagander
Subject Re: [GENERAL] pg_rewind - restore new slave failed to startup during recovery
Date
Msg-id CABUevEx1kLkXmBKHTNawy5S-iLZFrv11fv1=7inwX7L80UOQUw@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] pg_rewind - restore new slave failed to startup during recovery  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [GENERAL] pg_rewind - restore new slave failed to startup during recovery  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
On Tue, Aug 22, 2017 at 3:06 AM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Tue, Aug 22, 2017 at 9:52 AM, Dylan Luong <Dylan.Luong@unisa.edu.au> wrote:
> 1.       Disable the master ltm member (all connections redired to slave
> member)
> 2.       Promote slave (touch promote.me)
> 3.       Stop the master db (old master)
> 4.       Do pg_rewind on the new slave (old master)
> 5.       Start the new slave.

That flow looks correct to me. No I think that you should trigger
manually a checkpoint after step 2 on the promoted standby so as its
control file gets forcibly updated correctly with its new timeline
number. This is a small but critical point people usually miss. The
documentation of pg_rewind does not mention this point when using a
live source server, and many people have fallen into this trap up to
now... We should really mention that in the docs. What do others
think?

If the documentation is missing such a clearly critical step, then I would say that's a definite documentation bug and it needs to be fixed. We can't really fault people for missing a small detail if we didn't document the small detail...

--

pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: [GENERAL] Deadlocks
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Porting libpq to QNX 4.25