| Split-brain dual primaries after a transient network partition | Homegrown failover scripts promote a standby on ping failure without distributed consensus (etcd, Consul, or pg_auto_failover monitor) or Linux softdog/IPMI fencing, leaving the old primary accepting writes. | Enforce strict DCS leader key TTLs, kernel watchdog hardware/software fencing before promotion, and HAProxy HTTP health checks that verify both leader role and DCS lock validity. |
| Replication slot WAL bloat fills primary disk during standby maintenance | Physical or logical replication slots retain WAL segments indefinitely when a standby disconnects or falls behind, and max_slot_wal_keep_size is left unset (-1). | Configure max_slot_wal_keep_size safety caps, pair physical slots with continuous pgBackRest S3/GCS WAL archiving for fallback catchup, and alert on pg_replication_slots retained bytes. |
| Former primary requires full multi-terabyte basebackup to rejoin after failover | wal_log_hints or data checksums are disabled, or the old primary wrote transactions after the standby promotion point, causing pg_rewind to fail on timeline divergence. | Enable data page checksums or wal_log_hints=on across all cluster nodes, configure restore_command access to the shared WAL archive, and automate pg_rewind before standby re-registration. |
| Synchronous replication stalls all primary writes during a single-AZ hiccup | synchronous_standby_names is configured with a single standby instead of an ANY 1 (node2, node3) quorum across three availability zones. | Deploy a 3-AZ quorum topology using ANY 1 (standby_az2, standby_az3) with synchronous_commit = remote_write or on, ensuring writes continue if any single standby restarts. |
| Application connections hang for minutes after a controlled switchover | Applications connect directly to node IPs or rely on high-TTL DNS records without PgBouncer PAUSE/RESUME orchestration or HAProxy fast health-check intervals. | Place HAProxy or Envoy in front of Patroni REST endpoints (/primary, /replica?lag=100MB) coupled with PgBouncer transaction pooling so switchovers reconnect in seconds. |
| Hot standby read queries cancel with 'conflict with recovery' errors | VACUUM on the primary removes dead tuples still visible to long-running analytical queries on the streaming replica, triggering hot_standby_feedback or max_standby_streaming_delay conflicts. | Route long reporting queries to a dedicated delayed or logical replica, tune max_standby_streaming_delay for OLTP readers, and isolate hot_standby_feedback to prevent primary bloat. |