Continue Logical Replication After Master Became Slave and then Became Master Again - Mailing list pgsql-general

From Avi Weinberg
Subject Continue Logical Replication After Master Became Slave and then Became Master Again
Date
Msg-id DB9PR07MB71806094127BF5936A6DB07ACB3A2@DB9PR07MB7180.eurprd07.prod.outlook.com
Whole thread Raw
List pgsql-general

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.

pgsql-general by date:

Previous
From: Isaac Morland
Date:
Subject: Re: Request for new column in pg_namespace
Next
From: Ron Johnson
Date:
Subject: Re: Request for new column in pg_namespace