Distributed systems
Quorum
A majority of members must agree before a decision stands, which is what stops two halves of a partitioned cluster both acting as leader.
Quorum is why cluster sizes are odd. Three members tolerate one failure and five tolerate two; four tolerate the same single failure as three while costing more. Losing quorum is meant to stop progress - a system that keeps writing without it has traded correctness for uptime silently.
Explained in depth
Patroni
How Patroni fails PostgreSQL over - the DCS leader lock, the ttl/loop_wait/retry_timeout rule, watchdog fencing, and a runnable three-node config.
etcdRaft, quorum and leases in etcd, the fsync latency budget that decides cluster stability, and the space-quota outage - compaction, defragmentation, recovery.