High availability

etcd (distributed consensus store)

Also called: DCS, distributed configuration store, Raft key-value store

etcd is a small, strongly-consistent key-value store that uses the Raft consensus algorithm to agree on data across an odd number of nodes (3 or 5). A write only succeeds if a majority (quorum) of nodes agree. In a Patroni cluster it is the "source of truth" (the DCS) that holds the leader key and member state.

What this means

A small, strongly-consistent key-value store that a cluster uses as its single source of truth. It only accepts a write when a majority of its (3 or 5) nodes agree, which is exactly what stops two Postgres nodes both believing they're primary. In a Patroni setup it holds the leader key and the member list.

Why it matters operationally

Because a value can only be written with quorum, a PostgreSQL node partitioned from the etcd majority cannot claim leadership and demotes itself. This consensus property is what makes split-brain prevention provable rather than best-effort.

← All glossary terms · GUC reference · Error catalog