Re: help with startup slave after pg_rewind

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dylan Luong <Dylan(dot)Luong(at)unisa(dot)edu(dot)au>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: help with startup slave after pg_rewind
Date: 2018-09-21 00:09:02
Message-ID: 20180921000902.GE1338@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 19, 2018 at 10:29:44PM +0000, Dylan Luong wrote:
> After promoting slave to master, I completed a pg_rewind of the slave
> (old master) to the new master. But when I try to start the slave I am
> getting the following error.
>
> I tried to run pg_rewind again, but now it says I cannot do it as its
> already same timeline.

What did pg_rewind tell you after the first run? If you remove the set
of WAL segments on the rewound instance and let it replay only segments
from the archive, are you able to get past?

There is an inconsistency in the WAL records you are trying to replay.
In this case a contrecord refers to a WAL record split across multiple
pages. The WAL reader is expecting one, and cannot find it. And that's
not normal. My bet is that something is wrong in your failover flow
which you think is right. It is hard to get that right.
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Cook 2018-09-21 02:23:57 Re: Code of Conduct
Previous Message Tom Lane 2018-09-20 22:51:11 Re: Out of Memory