In patroni.yml add synchronous_mode: true under the bootstrap.dcs section; Patroni will automatically designate one synchronous standby and update PostgreSQL's synchronous_standby_names
Set synchronous_mode_strict: false initially so that if no synchronous standby is available the primary can still accept writes; use true only if your RPO requires zero data loss at the cost of availability
Verify synchronous replication is active: on the primary check pg_stat_replication — the sync_state column should show sync for the designated standby
Test failover by stopping the primary node; Patroni should promote the synchronous standby; confirm with patronictl list that the new leader is the former synchronous standby
After promotion, Patroni automatically selects a new synchronous standby from remaining replicas and updates synchronous_standby_names; monitor the transition with patronictl history
Tune maximum_lag_on_failover alongside synchronous_mode so that asynchronous replicas with significant lag are not promoted accidentally if the synchronous standby is also unavailable
Known gotchas
With synchronous_mode_strict: true, writes will block indefinitely if no synchronous standby is available (e.g., during a replica restart); ensure you have enough healthy replicas or use strict mode only in clusters where availability can be sacrificed for durability
Patroni's synchronous mode manages synchronous_standby_names dynamically; do not manually set synchronous_standby_names in postgresql.conf when using Patroni — it will be overwritten and may cause conflicts
A split-brain scenario is possible if the DCS (etcd/Consul) becomes partitioned; ensure the DCS cluster itself has a quorum of odd-numbered nodes across failure domains to prevent two nodes both believing they are primary
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp