pg_rewind interesting issue. Any feedback appreciated

From: J T <jorge(dot)torralba(at)gmail(dot)com>
To: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: pg_rewind interesting issue. Any feedback appreciated
Date: 2020-04-07 00:30:18
Message-ID: CACut7uRREquec9xRvE_w28yF+aVf2P2E3-c8vJ_oK-Owukyr2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2020-04-07 06:27:16 Re: Significance of backend_xmin in pg_stat_activity view
Previous Message postgann2020 s 2020-04-06 17:41:33 Significance of backend_xmin in pg_stat_activity view