High availability

Patroni

Also called: Patroni agent, HA cluster manager, patronictl

Patroni is an open-source agent that runs beside each PostgreSQL node and automates high availability. It stores cluster state in a distributed consensus store (etcd, Consul, ZooKeeper, or Kubernetes), elects a single primary via a leader key, promotes a standby on failure, and rejoins old primaries with pg_rewind. PostgreSQL provides the failover primitives; Patroni decides when to use them.

What this means

An agent that runs next to each PostgreSQL node and automates failover so a human doesn't have to. It keeps the cluster's "who is primary" state in a shared consensus store, promotes a standby when the primary dies, and rejoins the old primary afterward. Postgres provides the failover tools; Patroni decides when to pull them.

Why it matters operationally

PostgreSQL has no built-in idea of "which node should be primary." Patroni supplies that decision safely, using a consensus store and a watchdog to prevent two nodes from ever being primary at once. patronictl is its operator CLI.

← All glossary terms · GUC reference · Error catalog