ClusterLabs / PAF

PostgreSQL Automatic Failover: High-Availibility for Postgres, based on Pacemaker and Corosync.
http://clusterlabs.github.io/PAF/
Other
339 stars 55 forks source link

How to configure PAF for two clusters from two different data centers #229

Open RajasekarArumugam28 opened 5 months ago

RajasekarArumugam28 commented 5 months ago

Hi,

I have 3 node (Master and 2 slave) setup in primary site and DR site. I have Pacemaker configure on both sites and I want to clarity how to configure replication between two data center masters. Please help.

Markus- commented 5 months ago

So you have a geo cluster using boothd or just two separate Clusters?

RajasekarArumugam28 commented 4 months ago

Two separate clusters (below is the output of one of the cluster and we have same setup in another location)

Node List:

Full List of Resources:

RajasekarArumugam28 commented 4 months ago

Hi @Markus- any help is highly appreciated.

Markus- commented 4 months ago

If you have two different clusters, the PAF could not help. The PAF is used in one single PostgreSQL-Cluster.

RajasekarArumugam28 commented 4 months ago

Hi @Markus- are you saying it is not possible to configure replication between two clusters with PAF

Markus- commented 4 months ago

This is not possible.

ioguix commented 4 months ago

Hi,

I'm not entirely sure it's not possible. You can probably setup a "promoted" cluster on one side and an "unpromoted" one on the other side using cascading replication.

You might be able to use target-role to keep your promotable resource as unpromoted on one side and set it to promoted on the other side, by hand. See: https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Explained/singlehtml/#resource-meta-attributes

You might be able to use booth ticket as well, constraining the promoted role to a ticket.

The challenging part is how you setup the cascading replication so all node on the "unpromoted" side does not replicate from the "promoted" side but from a local standby...It might involve some pacemaker rules, or hand setup...

I never tried such setup, but it would be nice to experiment around this.

RajasekarArumugam28 commented 4 months ago

I am trying on this and let you know if any queries.

asphator commented 2 months ago

I don't understand the point of having PAF between 2 masters of 2 different clusters... What do you failover then if not the master role ? Could you describe a use case please ?