{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d", "published": "2026-10-19T07:19:04Z", "publisher": "PostgresAI", "article": {"title": "Postgres High Availability from first principles", "url": "https://multigres.com/blog/high-availability-from-first-principles", "date_published": "2026-05-28T00:00:00Z", "author": "Rafael Chacon", "publisher": "Multigres"}, "grade": "B", "axes": [{"axis": "Factual", "summary": "B \u00b7 1 wrong of 14 checked \u00b7 0 caveats"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 8 checked \u00b7 1 caveat"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 14 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "A \u00b7 0 wrong of 4 checked \u00b7 0 caveats"}, {"axis": "Safe", "summary": "not applicable"}], "findings": [{"anchor": "F1", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F1", "claim": "A replica acknowledges it once it has streamed and applied the WAL.", "title": "Replica acknowledgment does not require WAL application", "explanation": "PostgreSQL reports write, flush, and replay positions separately. REL_18_4 synchronous_commit=on waits for standby flush, not replay. remote_apply waits for replay. Multigres selects on for replicated durability. A flush acknowledgment does not establish visibility to standby queries.", "verdict": "False", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/config.sgml#L3204-L3213", "label": "REL_18_4 \u00b7 doc/src/sgml/config.sgml:3204-3213"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/config.sgml#L3204-L3213", "label": "REL_18_4 \u00b7 doc/src/sgml/config.sgml:3204-3213"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/replication/walreceiver.c#L1125-L1139", "label": "REL_18_4 \u00b7 src/backend/replication/walreceiver.c:1125-1139"}, {"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/common/consensus/policy_at_least_n.go#L95-L135", "label": "multigres@main@5b40c9c455 \u00b7 go/common/consensus/policy_at_least_n.go:95-135"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/replication/walreceiver.c#L1128-L1136", "label": "REL_18_4 \u00b7 src/backend/replication/walreceiver.c:1128-1136"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/config.sgml#L3210-L3213", "label": "REL_18_4 \u00b7 doc/src/sgml/config.sgml:3210-3213"}]}, {"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F2", "claim": "A primary acknowledges a write once it is durable on local storage.", "explanation": "The sentence describes default asynchronous replication. It omits configuration qualifiers. REL_18_4 doc/src/sgml/config.sgml:3179 permits acknowledgment before local flush with synchronous_commit=off. Lines 3197\u20133213 add standby requirements for synchronous replication. Check synchronous_commit and synchronous_standby_names before changing the HA design.", "verdict": "Mostly accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/config.sgml#L3204-L3213", "label": "REL_18_4 \u00b7 doc/src/sgml/config.sgml:3204-3213"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/config.sgml#L3173-L3183", "label": "REL_18_4 \u00b7 doc/src/sgml/config.sgml:3173-3183"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/access/transam/xact.c#L1540-L1560", "label": "REL_18_4 \u00b7 src/backend/access/transam/xact.c:1540-1560"}, {"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/common/consensus/policy_at_least_n.go#L95-L135", "label": "multigres@main@5b40c9c455 \u00b7 go/common/consensus/policy_at_least_n.go:95-135"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/config.sgml#L3197-L3200", "label": "REL_18_4 \u00b7 doc/src/sgml/config.sgml:3197-3200"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/access/transam/xact.c#L1556-L1557", "label": "REL_18_4 \u00b7 src/backend/access/transam/xact.c:1556-1557"}]}, {"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F3", "claim": "\u2026runs pg_promote\u2026", "title": "pg_promote triggers standby promotion", "explanation": "REL_18_4 documents pg_promote as promoting a standby to primary. src/backend/access/transam/xlogfuncs.c creates the promotion signal file and signals the postmaster.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/func.sgml#L29353-L29359", "label": "REL_18_4 \u00b7 doc/src/sgml/func.sgml:29353-29359"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/access/transam/xlogfuncs.c#L670-L742", "label": "REL_18_4 \u00b7 src/backend/access/transam/xlogfuncs.c:670-742"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/func.sgml#L29354-L29354", "label": "REL_18_4 \u00b7 doc/src/sgml/func.sgml:29354-29354"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F4", "claim": "Replicas accept only one coordinator per term\u2026", "title": "A replica rejects another coordinator at its accepted term", "explanation": "Multigres rejects a different coordinator at an already accepted term. Its AT_LEAST_N recruitment checks also require majority overlap and fewer than N unrecruited members. These checks match the article's distinction between coordinator exclusion and revoking old-policy progress.", "verdict": "Accurate", "sources": [{"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/common/consensus/revocation.go#L195-L229", "label": "multigres@main@5b40c9c455 \u00b7 go/common/consensus/revocation.go:195-229"}, {"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/common/consensus/policy_at_least_n.go#L41-L90", "label": "multigres@main@5b40c9c455 \u00b7 go/common/consensus/policy_at_least_n.go:41-90"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F5", "claim": "\u2026The new leader is chosen from the nodes already tied at that most-advanced position.", "title": "Leader discovery retains candidates tied at the highest eligible LSN", "explanation": "go/common/consensus/proposals.go:395-424 filters recruits by the outgoing rule. A higher LSN replaces earlier candidates. Equal LSNs retain multiple eligible candidates.", "verdict": "Accurate", "sources": [{"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/common/consensus/proposals.go#L395-L424", "label": "multigres@main@5b40c9c455 \u00b7 go/common/consensus/proposals.go:395-424"}, {"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/common/consensus/proposals.go#L375-L435", "label": "multigres@main@5b40c9c455 \u00b7 go/common/consensus/proposals.go:375-435"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F6", "claim": "Multigres runs pg_rewind automatically as part of bringing the old primary back.", "title": "Multigres automatically rewinds a divergent returning primary", "explanation": "Multigres routes stale-leader recovery through SetTermPrimary. Its manager invokes pg_rewind with -R when the servers diverged. PostgreSQL finds the divergence through timeline histories. WAL recovery then brings the target into a consistent state.", "verdict": "Accurate", "sources": [{"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/services/multiorch/recovery/actions/demote_stale_leader.go#L130-L179", "label": "multigres@main@5b40c9c455 \u00b7 go/services/multiorch/recovery/actions/demote_stale_leader.go:130-179"}, {"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/services/multipooler/manager/rpc_manager.go#L1069-L1090", "label": "multigres@main@5b40c9c455 \u00b7 go/services/multipooler/manager/rpc_manager.go:1069-1090"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/bin/pg_rewind/pg_rewind.c#L386-L400", "label": "REL_18_4 \u00b7 src/bin/pg_rewind/pg_rewind.c:386-400"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/ref/pg_rewind.sgml#L42-L110", "label": "REL_18_4 \u00b7 doc/src/sgml/ref/pg_rewind.sgml:42-110"}, {"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/services/multiorch/recovery/actions/demote_stale_leader.go#L145-L180", "label": "multigres@main@5b40c9c455 \u00b7 go/services/multiorch/recovery/actions/demote_stale_leader.go:145-180"}, {"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/go/cmd/pgctld/command/rewind.go#L45-L53", "label": "multigres@main@5b40c9c455 \u00b7 go/cmd/pgctld/command/rewind.go:45-53"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F8", "claim": "\u2026because the timelines do not match\u2026", "title": "Divergent WAL history prevents the described direct streaming recovery", "explanation": "REL_18_4 src/backend/replication/walsender.c:879-918 checks the requested start position against timeline history. It rejects a start position beyond the fork point. This supports the article's divergent-old-primary scenario.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/replication/walsender.c#L879-L918", "label": "REL_18_4 \u00b7 src/backend/replication/walsender.c:879-918"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F9", "claim": "A primary can crash holding writes that no replica ever sees.", "title": "Asynchronous replication permits primary-only committed writes", "explanation": "REL_18_4 streaming replication is asynchronous by default. A primary crash can leave committed transactions absent from standbys. The article's possible primary-only WAL scenario matches that behavior.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/access/transam/xact.c#L1540-L1560", "label": "REL_18_4 \u00b7 src/backend/access/transam/xact.c:1540-1560"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/high-availability.sgml#L1060-L1081", "label": "REL_18_4 \u00b7 doc/src/sgml/high-availability.sgml:1060-1081"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/high-availability.sgml#L530-L533", "label": "REL_18_4 \u00b7 doc/src/sgml/high-availability.sgml:530-533"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F10", "claim": "Generalized consensus separates the roles\u2026", "title": "The cited framework separates coordination from replication", "explanation": "Part 11 assigns leadership changes to coordinators. It separately defines leaders, followers, and observers.", "verdict": "Accurate", "sources": [{"url": "https://multigres.com/blog/generalized-consensus-part11", "label": "https://multigres.com/blog/generalized-consensus-part11"}]}, {"anchor": "F11", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F11", "claim": "Those requirements are externally specified by policy\u2026", "title": "The cited framework permits external durability policies", "explanation": "Part 11 explicitly permits externally specified durability policies. It restricts those policies to cohort nodes and static node properties.", "verdict": "Accurate", "sources": [{"url": "https://multigres.com/blog/generalized-consensus-part11", "label": "https://multigres.com/blog/generalized-consensus-part11"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F12", "claim": "If you let it stream from the new primary directly, Postgres will refuse\u2026", "title": "Streaming rejects a requested position beyond the timeline fork", "explanation": "PostgreSQL rejects a requested starting point beyond its timeline fork. REL_18_4 src/backend/replication/walsender.c:905 checks that condition. The article describes an old primary containing divergent WAL, so this refusal fits its scenario.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/replication/walsender.c#L905-L909", "label": "REL_18_4 \u00b7 src/backend/replication/walsender.c:905-909"}]}, {"anchor": "F13", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F13", "claim": "The old primary's local writes after the divergence are discarded.", "title": "Rewind removes divergent target changes and recovery follows source WAL", "explanation": "pg_rewind replaces divergent target blocks from the source. REL_18_4 src/bin/pg_rewind/pg_rewind.c:585 fetches those blocks. Recovery then replays source WAL from the checkpoint preceding divergence.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/ref/pg_rewind.sgml#L82-L86", "label": "REL_18_4 \u00b7 doc/src/sgml/ref/pg_rewind.sgml:82-86"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/bin/pg_rewind/pg_rewind.c#L585-L589", "label": "REL_18_4 \u00b7 src/bin/pg_rewind/pg_rewind.c:585-589"}]}, {"anchor": "F14", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F14", "claim": "\u2026the primary stops accepting new writes before the new primary takes over\u2026", "title": "The planned transition stops serving through the old primary", "explanation": "The planned transition demotes the primary and buffers requests. main@5b40c9c455 docs/query_serving/failover_buffering.md:29 documents NOT_SERVING and MTF01. Buffering ends when the new primary reports that it serves requests.", "verdict": "Accurate", "sources": [{"url": "https://github.com/multigres/multigres/blob/5b40c9c455b4d25c5e1cae80b85cc38422a023fa/docs/query_serving/failover_buffering.md#L29-L35", "label": "multigres@main@5b40c9c455 \u00b7 docs/query_serving/failover_buffering.md:29-35"}]}, {"anchor": "F15", "url": "https://pgtrue.postgres.ai/shared/brief/4b9b420c-d03e-4e64-9103-58ef8278a64d#F15", "claim": "Postgres makes a guarantee that is weaker than the consensus contract.", "title": "PostgreSQL alone does not provide the complete failover contract", "explanation": "PostgreSQL alone does not implement the complete failover contract described here. REL_18_4 doc/src/sgml/high-availability.sgml:1457 requires external failure detection and standby notification. Its asynchronous replication also permits unshipped committed WAL.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/high-availability.sgml#L530-L533", "label": "REL_18_4 \u00b7 doc/src/sgml/high-availability.sgml:530-533"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/high-availability.sgml#L1457-L1459", "label": "REL_18_4 \u00b7 doc/src/sgml/high-availability.sgml:1457-1459"}]}]}