pg_rewind interesting issue. Any feedback appreciated - Mailing list pgsql-admin

From J T
Subject pg_rewind interesting issue. Any feedback appreciated
Date
Msg-id CACut7uRREquec9xRvE_w28yF+aVf2P2E3-c8vJ_oK-Owukyr2Q@mail.gmail.com
Whole thread Raw
List pgsql-admin

Running pg_rewind on postgres 11 debian

We have a primary with two cascading replicas

1--->2--->3

We have an automated process that fails over our server, does a rewind and setup recovery.conf

Under Normal conditions .....

we would promote 2, pg_rewind 1 from 2, modify the recovery.conf file of 1 to point to 3 not 2. So it looks like this

2--->3--->1

However, the pg_rewind is affecting a server not involved in the process. Our process does the pg rewind, looks for a healthy replica to point the newly rewound server to so we are back in cascading mode. However, when we issue the pg_rewind of 1 from 2, server 3 goes off line and is no longer replicating from 2. Thus we wend up with ...

2--->1

And 3 is out of the chain.

Why would pg rewind affect a server that is part of cascading replication but not touched by the process?

Thanks


--
Thanks,

Jorge Torralba
----------------------------

Note: This communication may contain privileged or other confidential information. If you are not the intended recipient, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this email in error and delete the copy you received. Thank You.

pgsql-admin by date:

Previous
From: postgann2020 s
Date:
Subject: Significance of backend_xmin in pg_stat_activity view
Next
From: Laurenz Albe
Date:
Subject: Re: Significance of backend_xmin in pg_stat_activity view