{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c", "published": "2026-10-30T12:17:57Z", "publisher": "PostgresAI", "article": {"title": "Designing a planned switchover for minimum disruption \u2014 PlanetScale", "url": "https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption", "date_published": "2026-10-29T00:00:00Z", "author": "Shlomi Noach", "publisher": "PlanetScale"}, "grade": "A-", "axes": [{"axis": "Factual", "summary": "A \u00b7 0 wrong of 15 checked \u00b7 0 caveats"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 15 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 15 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "A \u00b7 0 wrong of 3 checked \u00b7 0 caveats \u00b7 transparency: no answered defects \u00b7 partly assessed"}, {"axis": "Safe", "summary": "A \u00b7 0 checked"}], "findings": [{"anchor": "F1", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F1", "claim": "\u2026the default synchronous_commit = on\u2026", "title": "synchronous_commit defaults to on", "explanation": "PostgreSQL 18.6 defaults synchronous_commit to on. With synchronous standbys configured, commits wait for the required remote flush. The article states this condition explicitly.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L5189-L5195", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:5189-5195"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3179-L3182", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:3179-3182"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3223-L3226", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:3223-3226"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3180-L3181", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:3180-3181"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L5189-L5196", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:5189-5196"}]}, {"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F2", "claim": "\u2026ANY 1 (...)\u2026", "title": "ANY 1 permits acknowledgment from any eligible standby", "explanation": "ANY 1 requires one listed standby's acknowledgment. src/backend/replication/syncrep.c:719 sorts standby positions descending. The quorum calculation uses the highest position when num_sync equals 1.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L4910-L4914", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:4910-4914"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/syncrep.c#L719-L726", "label": "REL_18_6 \u00b7 src/backend/replication/syncrep.c:719-726"}]}, {"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F3", "claim": "\u2026at least one attached replica must appear in the configuration.", "title": "The promoted target needs an eligible synchronous standby", "explanation": "The article's ANY 1 policy requires one eligible standby after promotion. src/backend/replication/syncrep.c:620 rejects quorum advancement when too few synchronous standbys remain.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/syncrep.c#L620-L624", "label": "REL_18_6 \u00b7 src/backend/replication/syncrep.c:620-624"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F4", "claim": "Neither of these actions prevents all future writes\u2026", "title": "The read-only transaction default does not fence writes", "explanation": "default_transaction_read_only controls new transactions. src/backend/access/transam/xact.c:2130 copies that default when a transaction starts. Existing transactions retain their state, and sessions can override the default.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L1658-L1665", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:1658-1665"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L2122-L2131", "label": "REL_18_6 \u00b7 src/backend/access/transam/xact.c:2122-2131"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10066-L10068", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:10066-10068"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F5", "claim": "\u2026background processes can continue to generate WAL.", "title": "Background checkpoints can advance WAL", "explanation": "The checkpointer calls CreateCheckPoint independently of client transaction defaults. src/backend/access/transam/xlog.c:7254 inserts the checkpoint WAL record. A running primary can advance beyond a sampled position.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/checkpointer.c#L479-L482", "label": "REL_18_6 \u00b7 src/backend/postmaster/checkpointer.c:479-482"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L7252-L7258", "label": "REL_18_6 \u00b7 src/backend/access/transam/xlog.c:7252-7258"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F6", "claim": "A clean shutdown produces an unambiguous final WAL position\u2026", "title": "Clean shutdown establishes a final WAL endpoint", "explanation": "PostgreSQL disables WAL insertion after its shutdown checkpoint. Patroni 4.1.5 calls stop during graceful demotion. The article correctly identifies shutdown as a way to establish a final WAL endpoint.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L7267-L7273", "label": "REL_18_6 \u00b7 src/backend/access/transam/xlog.c:7267-7273"}, {"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1644-L1647", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:1644-1647"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F7", "claim": "\u2026or let the eligible replicas choose through its distributed leader election.", "title": "Patroni supports candidate selection and distributed leader election", "explanation": "Patroni 4.1.5 can restrict promotion checks to a named candidate. Its election path acquires a distributed leader lock. The article's description matches these mechanisms.", "verdict": "Accurate", "sources": [{"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L2490-L2492", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:2490-2492"}, {"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L349-L352", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:349-352"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F8", "claim": "A replica cannot follow a primary with larger values for settings such as max_connections and max_worker_processes .", "title": "Promotion candidates must satisfy replica capacity requirements", "explanation": "PostgreSQL checks max_connections and max_worker_processes against the primary's recorded values. A replica with insufficient settings cannot continue normal hot-standby recovery. The article correctly checks compatibility before promotion.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L717-L719", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:717-719"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L5445-L5450", "label": "REL_18_6 \u00b7 src/backend/access/transam/xlog.c:5445-5450"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F9", "claim": "Promoting a replica while the old primary is still writable can result in two writable primaries.", "title": "Promotion alone does not fence the old primary", "explanation": "PostgreSQL's failover documentation warns that both servers can consider themselves primary. It requires a mechanism that prevents the old primary from retaining that role.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/high-availability.sgml#L1438-L1443", "label": "REL_18_6 \u00b7 doc/src/sgml/high-availability.sgml:1438-1443"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F10", "claim": "\u2026received and applied all the WAL we expect it to have.", "title": "Promotion must preserve the required WAL", "explanation": "PostgreSQL finishes replaying available archive and local WAL before completing promotion. src/backend/access/transam/xlogrecovery.c:3657 documents this behavior. The article correctly requires the target to replay its required endpoint.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlogrecovery.c#L3657-L3665", "label": "REL_18_6 \u00b7 src/backend/access/transam/xlogrecovery.c:3657-3665"}]}, {"anchor": "F11", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F11", "claim": "Patroni, a popular open-source Postgres cluster management tool, takes this approach.", "title": "Patroni stops PostgreSQL during graceful demotion", "explanation": "Patroni 4.1.5 invokes graceful demotion for a requested switchover. That mode selects a fast shutdown with a checkpoint. The demotion function calls PostgreSQL's stop handler.", "verdict": "Accurate", "sources": [{"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1600-L1600", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:1600-1600"}, {"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1644-L1644", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:1644-1644"}, {"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1761-L1761", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:1761-1761"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F12", "claim": "Patroni can validate a candidate named by the operator\u2026", "explanation": "Patroni 4.1.5 can restrict selection to a named candidate. It fetches candidate status and checks promotion restrictions. E-39 and E-40 support these steps.", "verdict": "Accurate", "sources": [{"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L2492-L2492", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:2492-2492"}, {"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1407-L1409", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:1407-1409"}]}, {"anchor": "F13", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F13", "claim": "\u2026let the eligible replicas choose through its distributed leader election.", "title": "Patroni supports election without a named successor", "explanation": "Patroni 4.1.5 compares eligible members when no successor is specified. A qualifying node then attempts to acquire the distributed leader lock.", "verdict": "Accurate", "sources": [{"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1492-L1492", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:1492-1492"}, {"url": "https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1777-L1778", "label": "patroni@v4.1.5 \u00b7 patroni/ha.py:1777-1778"}]}, {"anchor": "F15", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F15", "claim": "\u2026the primary is still running and can keep generating WAL while we're doing this\u2026", "title": "A sampled WAL position can become stale", "explanation": "P can generate additional WAL while writes continue. The backup documentation confirms that PostgreSQL records data changes in WAL before changing disk data.", "verdict": "Accurate", "sources": [{"url": "https://planetscale.com/blog/postgres-backups-under-the-hood", "label": "https://planetscale.com/blog/postgres-backups-under-the-hood"}]}, {"anchor": "F16", "url": "https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F16", "claim": "\u2026no further commit can be acknowledged unless R2 has flushed it.", "explanation": "After R2 replays through the final endpoint covering R1 and R3, subsequent WAL-dependent commits require R2's flush. This assumes synchronous_commit=on, ANY 1, and R2 as the sole eligible connected standby. E-51 supports remote-flush semantics. It does not verify the disconnection and catch-up sequence.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L4910-L4914", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:4910-4914"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/syncrep.c#L719-L726", "label": "REL_18_6 \u00b7 src/backend/replication/syncrep.c:719-726"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3169-L3248", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:3169-3248"}]}]}