public inbox for [email protected]  
help / color / mirror / Atom feed
From: Avi Weinberg <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Continue Logical Replication After Master Became Slave and then Became Master Again
Date: Sun, 15 Dec 2024 17:41:05 +0000
Message-ID: <DB9PR07MB71806094127BF5936A6DB07ACB3A2@DB9PR07MB7180.eurprd07.prod.outlook.com> (raw)

Hi All,

Postgres 15.2

We have Patroni cluster with one master and two replicas.  The master is publisher (logical replication) to some subscriptions running on other clusters.  When we have a failover, the master becomes replica and one of the replicas assume the role of master.  In such a case, we need to rebuild the subscriptions to point to the new master.  However, to avoid that, can we just do fallback and move back to the old master assuming the following options - what if:

  1.  No data was written to the database from the time of the failover until the failback
  2.  No data was written to the replicated tables (but other tables were updated) from the time of the failover until the failback
  3.  The replicated tables were updated from the time of the failover until the failback



Thanks

IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Continue Logical Replication After Master Became Slave and then Became Master Again
  In-Reply-To: <DB9PR07MB71806094127BF5936A6DB07ACB3A2@DB9PR07MB7180.eurprd07.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox