Configuring Pacemaker constraints for Postgres on Shared Storage

From: Pratik Pandit <pratikpandit5322(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Configuring Pacemaker constraints for Postgres on Shared Storage
Date: 2026-06-03 18:26:36
Message-ID: CAFchsDXBY69YVYuke-9zxZubqE1hW7oZj=vDYwNyUhuxWyvAYA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all,

I am configuring a 2-node Pacemaker cluster to manage a PostgreSQL
instance. The architecture relies on an external distributed storage array.
Node 1 and Node 2 both see the block device, but only the active node
should mount it and start PostgreSQL.

I want to ensure my Pacemaker colocation and ordering constraints are
mathematically airtight to prevent split-brain.

Currently, I am planning the following resource group/constraints:

1.

Virtual IP (IPaddr2)
2.

Filesystem Mount (Filesystem)
3.

PostgreSQL Service (pgsql)

My questions for the community:

-

Is it safer to group these resources together so they always migrate as
a single unit, or handle them via explicit colocation and order
constraints?
-

When using distributed storage, how do you handle the postgresql.conf
parameters like archive_command or tracking replication states when the
secondary node boots up using the exact same data directory bytes as the
primary?
-

If you have a working boilerplate XML or pcs command template for a
shared-storage Postgres setup, it would be incredibly helpful.

Appreciate any insights or pitfalls to avoid!

Thanks

Browse pgsql-admin by date

  From Date Subject
Next Message Raj 2026-06-04 04:11:29 Low TPS
Previous Message Pratik Pandit 2026-06-03 18:20:27 Best practices for a 2-node Patroni + PostgreSQL cluster with a external/witness DCS