patroni icon indicating copy to clipboard operation
patroni copied to clipboard

Some questions about setting up standby cluster

Open bjzhangl opened this issue 2 years ago • 5 comments

We want to use patroni to set up a standby cluster. We want to make clear some points.

  1. We have another etcd cluster in the region where standby cluster will be deployed. Can we use this etcd cluster for standby cluster and a different etcd cluster for primary cluster which is deployed on another region? Or we must use the same etcd cluster for both standby cluster and primary cluster?
  2. If primary switch over or fail over occurs in primary cluster, will the standby leader follow the new primary automatically?
  3. We do not want to use permanent replication slot. If primary switch over in primary cluster, do we need to set up the replication slot again for standby leader? Appreciate for your reply.

bjzhangl avatar Jun 22 '22 10:06 bjzhangl

what have you tried so far?

CyberDem0n avatar Jun 22 '22 10:06 CyberDem0n

We just check some doc for standby cluster. And not do POC yet. After read the doc, we have the above questions.

bjzhangl avatar Jun 22 '22 10:06 bjzhangl

There is just one thing you need to understand, the standby cluster doesn't know anything where it replicates from. It could be just a standalone Postgres. Keeping that in mind I believe you can deduce answers to your questions.

CyberDem0n avatar Jun 22 '22 10:06 CyberDem0n

@CyberDem0n Thanks. What about system identifier? I think It should be the same with the primary cluster so that streaming replication can be done?

bjzhangl avatar Jun 23 '22 02:06 bjzhangl

I think It should be the same with the primary cluster so that streaming replication can be done?

Correct, the standby cluster could be considered as a cascading replicas.

CyberDem0n avatar Jun 24 '22 07:06 CyberDem0n