Re: Postgresql 9.6.12 switchover failing - Mailing list pgsql-admin

From Jehan-Guillaume (ioguix) de Rorthais
Subject Re: Postgresql 9.6.12 switchover failing
Date
Msg-id 20190308175149.02edbcc0@firost
Whole thread Raw
In response to Re: Postgresql 9.6.12 switchover failing  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Responses Re: Postgresql 9.6.12 switchover failing
List pgsql-admin
On Fri, 8 Mar 2019 22:10:15 +0530
Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:

> Hi Marian,
> 
> Yes, We have faced the same issue, generally, this type of issue occurs due
> to missing of history file i.e(00000000.history) during the replication
> setup using the pg_basebackup.
> 
> To resolve this type issue you need to create an empty history file with
> name 00000000.history on the master server then rebuild old master by
> initiating the pg_basebackup.

Uh, what? Do you have further info about this? I fail to understand how this is
related to OP question...

> On Fri, Mar 8, 2019 at 8:11 PM M Jane <mskiesewetter@gmail.com> wrote:
...
> > But bringing up the old primary as a slave doesn't work. I get errors (
> > like >FATAL:  requested timeline 5 is not a child of this server's history)
> > and the instances shuts down automatically.

While doing a clean switchover, I never seen this (yet).

How are you checking both servers are up-to-date? Do you check that the standby
received everything from the old primary, including its shutdown checkpoint,
before promoting?

Make sure your standby staid connected to your old primary until the later is
completely shutdown-ed. Nothing should disconnect them during the whole
process. And make sure to use mode fast or smart to stop the old primary.

Are you able to share with us the restart checkpoint on the old
primary and the history file created by the new-primary? How far are the
restart LSN and timeline fork from each other?

Regards,


pgsql-admin by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Upgrade 10.5->10.6 : db crash BUS ERROR (sig 10), reproducible
Next
From: Alvaro Herrera
Date:
Subject: Re: Upgrade 10.5->10.6 : db crash BUS ERROR (sig 10), reproducible