Re: Failover Testing Failures: invalid resource manager ID in primary checkpoint record - Mailing list pgsql-admin

From Don Seiler
Subject Re: Failover Testing Failures: invalid resource manager ID in primary checkpoint record
Date
Msg-id CAHJZqBAOo+TCLwCxf8-_0h4r=kYFpDb8UC5hxLv_mDfUHJ8vkg@mail.gmail.com
Whole thread Raw
In response to Re: Failover Testing Failures: invalid resource manager ID in primary checkpoint record  (Don Seiler <don@seiler.us>)
List pgsql-admin
On Thu, Jan 19, 2023 at 9:57 AM Don Seiler <don@seiler.us> wrote:
On Thu, Jan 19, 2023 at 9:50 AM Don Seiler <don@seiler.us> wrote:
I'm going to have to review what chef might have done. I was relying on chef to deploy the configs before attempting to restart but it may have tried to start the service early

Reviewing the chef recipe, this does seem to be the case. The code to determine whether or not to place the standby.signal file comes after it already attempts to start the PG service. Another self-inflicted wound apparently.

Yes this was exactly what the problem was. After fixing the order of operations in the chef recipe, the old primary nicely transitioned into the new replica without having to do any rewind/restore operation. Obviously requires cleanly shutting down the old primary first, which should be the case for planned DR exercises. True DR emergencies would require rewind or restore if the old primary were revived.

Don. 

--
Don Seiler
www.seiler.us

pgsql-admin by date:

Previous
From: Don Seiler
Date:
Subject: Re: Failover Testing Failures: invalid resource manager ID in primary checkpoint record
Next
From: Stephen Frost
Date:
Subject: Re: pgbackrest questions