PAF icon indicating copy to clipboard operation
PAF copied to clipboard

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

Open RajasekarArumugam28 opened this issue 1 year ago • 9 comments

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.

RajasekarArumugam28 avatar Apr 19 '24 17:04 RajasekarArumugam28

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

Markus- avatar Apr 20 '24 08:04 Markus-

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

Node List:

  • Online: [ pg0 pg1 pg2 ]

Full List of Resources:

  • MASTER (ocf::pacemaker:Dummy): Started pg0
  • vip (ocf::heartbeat:IPaddr2): Started pg0
  • mgmt_vip (ocf::heartbeat:IPaddr2): Started pg0
  • Clone Set: pgsql-ha [pgsqld] (promotable):
    • Masters: [ pg0 ]
    • Slaves: [ pg1 pg2 ]

RajasekarArumugam28 avatar Apr 22 '24 12:04 RajasekarArumugam28

Hi @Markus- any help is highly appreciated.

RajasekarArumugam28 avatar Apr 23 '24 12:04 RajasekarArumugam28

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

Markus- avatar Apr 23 '24 13:04 Markus-

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

RajasekarArumugam28 avatar Apr 23 '24 13:04 RajasekarArumugam28

This is not possible.

Markus- avatar Apr 23 '24 13:04 Markus-

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.

ioguix avatar Apr 24 '24 09:04 ioguix

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

RajasekarArumugam28 avatar May 01 '24 09:05 RajasekarArumugam28

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 ?

asphator avatar Jul 09 '24 14:07 asphator