Thread: Continue Logical Replication After Master Became Slave and then Became Master Again
Continue Logical Replication After Master Became Slave and then Became Master Again
From
Avi Weinberg
Date:
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:
- No data was written to the database from the time of the failover until the failback
- No data was written to the replicated tables (but other tables were updated) from the time of the failover until the failback
- The replicated tables were updated from the time of the failover until the failback
Thanks