Paste into your AI assistant to fix the article, then ask for a re-review.
Show the text
Fix the article with this report, then ask pgTrue for a re-review.
# pgTrue report: Designing a planned switchover for minimum disruption — PlanetScale
Article title: Designing a planned switchover for minimum disruption — PlanetScale
Article URL: https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption
Report URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c
Audited revision: 2 of 2, 2026-10-30 12:17:57 UTC
Overall letter: A-
## Axes
- Factual: A · 0 wrong · 15 checked · 0 caveats · assessed
- Applicable: A · 0 wrong · 15 checked · 0 caveats · assessed
- Consistent: A · 0 wrong · 15 checked · 0 caveats · assessed
- Transparent: A · 0 wrong · 3 checked · 0 caveats · partly assessed
- Safe: A · 0 wrong · 0 checked · 0 caveats · assessed
ElephantSeal: A-.
Open conditions: the central claim is not yet backed by evidence.
## Report metadata
- Report: Technical fact-check, edition 2
- pgTrue version: audited with v1.1.3
- Issued: 2026-10-30
- Edition: Updated after review. Corrections are listed below.
- Submitted: Submitted by the PostgresAI team.
- Author response: No written reply from the author. We re-audited this article 1 time; see Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).
## Findings needing a change (0)
None.
## Verified accurate claims (15)
### F1 · Accurate · Factual · synchronous_commit defaults to on
Location: excerpt · section “Nothing acknowledged is lost” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=the%20default%20synchronous_commit%20%3D%20on)
Article says:
```text
…the default synchronous_commit = on…
```
What is true:
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.
Charitable reading:
The durability statement explicitly assumes Neki's synchronous policy and synchronous_commit=on.
Review: We tested the empty-standby exception. F1 explicitly requires configured synchronous standbys and correctly identifies the default. We checked whether the finding treats synchronous_commit=on as an unconditional durability guarantee. It explicitly requires configured synchronous standbys.
Sources:
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:5189-5195](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L5189-L5195)
Excerpt:
```text
{"synchronous_commit", PGC_USERSET, WAL_SETTINGS,
gettext_noop("Sets the current transaction's synchronization level."),
NULL
},
&synchronous_commit,
SYNCHRONOUS_COMMIT_ON, synchronous_commit_options,
NULL, assign_synchronous_commit, NULL
```
- [REL_18_6 · doc/src/sgml/config.sgml:3179-3182](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3179-L3182)
Excerpt:
```text
indication to the client. Valid values are
<literal>remote_apply</literal>, <literal>on</literal>
(the default), <literal>remote_write</literal>,
<literal>local</literal>, and <literal>off</literal>.
```
- [REL_18_6 · doc/src/sgml/config.sgml:3223-3226](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3223-L3226)
Excerpt:
```text
it waits for WAL replay. When set to <literal>on</literal>,
commits wait until replies
from the current synchronous standby(s) indicate they have received
the commit record of the transaction and flushed it to durable storage. This
```
- [REL_18_6 · doc/src/sgml/config.sgml:3180-3181](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3180-L3181)
Excerpt:
```text
<literal>remote_apply</literal>, <literal>on</literal>
(the default), <literal>remote_write</literal>,
```
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:5189-5196](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L5189-L5196)
Qualification: Version note: PostgreSQL 18.6
Excerpt:
```text
&synchronous_commit,
SYNCHRONOUS_COMMIT_ON, synchronous_commit_options,
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F1
### F2 · Accurate · Factual · ANY 1 permits acknowledgment from any eligible standby
Location: excerpt · section “Preserving synchronous replication” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=ANY%201%20%28,%29)
Article says:
```text
…ANY 1 (...)…
```
What is true:
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.
Charitable reading:
The article describes ANY 1 with every eligible replica listed.
Review: We checked whether ANY 1 selects a fixed standby. The descending position calculation supports acknowledgment from any eligible standby. We tested the priority-based interpretation. ANY selects quorum replication, and the descending-position calculation selects the highest position for one required standby.
Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:4910-4914](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L4910-L4914)
Excerpt:
```text
The keyword <literal>ANY</literal>, coupled with
<replaceable class="parameter">num_sync</replaceable>, specifies a
quorum-based synchronous replication and makes transaction commits
wait until their WAL records are replicated to <emphasis>at least</emphasis>
<replaceable class="parameter">num_sync</replaceable> listed standbys.
```
- [REL_18_6 · src/backend/replication/syncrep.c:719-726](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/syncrep.c#L719-L726)
Excerpt:
```text
/* Sort each array in descending order */
qsort(write_array, num_standbys, sizeof(XLogRecPtr), cmp_lsn);
qsort(flush_array, num_standbys, sizeof(XLogRecPtr), cmp_lsn);
qsort(apply_array, num_standbys, sizeof(XLogRecPtr), cmp_lsn);
/* Get Nth latest Write, Flush, Apply positions */
*writePtr = write_array[nth - 1];
*flushPtr = flush_array[nth - 1];
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F2
### F3 · Accurate · Factual · The promoted target needs an eligible synchronous standby
Location: excerpt · section “Preserving synchronous replication” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=at%20least%20one%20attached%20replica%20must%20appear%20in%20the%20configuration.)
Article says:
```text
…at least one attached replica must appear in the configuration.
```
What is true:
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.
Charitable reading:
The requirement applies to the article's nonempty ANY 1 synchronous configuration.
Review: We tested whether disabling synchronous replication defeats the claim. F3 retains the article's ANY 1 policy, so that exception does not apply. We considered an empty synchronous configuration. The finding applies to the article's retained ANY 1 policy, which requires an eligible standby.
Sources:
- [REL_18_6 · src/backend/replication/syncrep.c:620-624](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/syncrep.c#L620-L624)
Excerpt:
```text
if (!(*am_sync) ||
num_standbys < SyncRepConfig->num_sync)
{
pfree(sync_standbys);
return false;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F3
### F4 · Accurate · Factual · The read-only transaction default does not fence writes
Location: excerpt · section “Establishing a final WAL position” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=Neither%20of%20these%20actions%20prevents%20all%20future%20writes)
Article says:
```text
Neither of these actions prevents all future writes…
```
What is true:
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.
Charitable reading:
The article explicitly distinguishes a transaction default from complete write fencing.
Review: We checked transaction initialization and setting permissions. The default applies to new transactions and permits session overrides. We checked whether changing the default also changes active transactions. Transaction startup copies the default, and PGC_USERSET permits session overrides.
Sources:
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:1658-1665](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L1658-L1665)
Excerpt:
```text
{"default_transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT,
gettext_noop("Sets the default read-only status of new transactions."),
NULL,
GUC_REPORT
},
&DefaultXactReadOnly,
false,
NULL, NULL, NULL
```
- [REL_18_6 · src/backend/access/transam/xact.c:2122-2131](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L2122-L2131)
Excerpt:
```text
if (RecoveryInProgress())
{
s->startedInRecovery = true;
XactReadOnly = true;
}
else
{
s->startedInRecovery = false;
XactReadOnly = DefaultXactReadOnly;
}
```
- [REL_18_6 · doc/src/sgml/config.sgml:10066-10068](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10066-L10068)
Excerpt:
```text
A read-only SQL transaction cannot alter non-temporary tables.
This parameter controls the default read-only status of each new
transaction. The default is <literal>off</literal> (read/write).
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F4
### F5 · Accurate · Factual · Background checkpoints can advance WAL
Location: excerpt · section “Establishing a final WAL position” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=background%20processes%20can%20continue%20to%20generate%20WAL.)
Article says:
```text
…background processes can continue to generate WAL.
```
What is true:
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.
Charitable reading:
The claim concerns WAL generation, which can continue without new client writes.
Review: We tested whether F5 promises continuous WAL generation. It claims only possibility, which checkpoint WAL insertion establishes. We tested whether WAL advancement requires client writes. The checkpointer calls CreateCheckPoint, which inserts and flushes a WAL record.
Sources:
- [REL_18_6 · src/backend/postmaster/checkpointer.c:479-482](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/checkpointer.c#L479-L482)
Excerpt:
```text
if (!do_restartpoint)
ckpt_performed = CreateCheckPoint(flags);
else
ckpt_performed = CreateRestartPoint(flags);
```
- [REL_18_6 · src/backend/access/transam/xlog.c:7252-7258](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L7252-L7258)
Excerpt:
```text
XLogBeginInsert();
XLogRegisterData(&checkPoint, sizeof(checkPoint));
recptr = XLogInsert(RM_XLOG_ID,
shutdown ? XLOG_CHECKPOINT_SHUTDOWN :
XLOG_CHECKPOINT_ONLINE);
XLogFlush(recptr);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F5
### F6 · Accurate · Factual · Clean shutdown establishes a final WAL endpoint
Location: excerpt · section “Establishing a final WAL position” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=A%20clean%20shutdown%20produces%20an%20unambiguous%20final%20WAL%20position)
Article says:
```text
A clean shutdown produces an unambiguous final WAL position…
```
What is true:
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.
Charitable reading:
The final position follows completed clean shutdown, rather than the initial shutdown request.
Review: We checked the end-of-recovery exception and shutdown timing. F6 concerns completed clean shutdown, where PostgreSQL disables further WAL insertion. We checked whether the endpoint exists when shutdown merely starts. The finding concerns completed clean shutdown, after PostgreSQL disables further WAL insertion.
Sources:
- [REL_18_6 · src/backend/access/transam/xlog.c:7267-7273](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L7267-L7273)
Excerpt:
```text
if (shutdown)
{
if (flags & CHECKPOINT_END_OF_RECOVERY)
LocalXLogInsertAllowed = oldXLogAllowed;
else
LocalXLogInsertAllowed = 0; /* never again write WAL */
}
```
- [[email protected] · patroni/ha.py:1644-1647](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1644-L1647)
Excerpt:
```text
self.state_handler.stop(str(mode_control['stop']), checkpoint=bool(mode_control['checkpoint']),
on_safepoint=self.watchdog.disable if self.watchdog.is_running else None,
on_shutdown=on_shutdown if mode_control['release'] else None,
before_shutdown=before_shutdown if mode == 'graceful' else None,
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F6
### F7 · Accurate · Factual · Patroni supports candidate selection and distributed leader election
Location: excerpt · section “Establishing a final WAL position” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=or%20let%20the%20eligible%20replicas,through%20its%20distributed%20leader%20election.)
Article says:
```text
…or let the eligible replicas choose through its distributed leader election.
```
What is true:
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.
Charitable reading:
The article allows either an operator-selected candidate or selection among eligible replicas.
Review: We checked whether candidate selection replaces distributed locking. Patroni supports named candidates and still acquires the distributed leader lock. We tested whether candidate selection replaces distributed election. Patroni can restrict candidates and still acquires the distributed leader lock.
Sources:
- [[email protected] · patroni/ha.py:2490-2492](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L2490-L2492)
Excerpt:
```text
Exclude non-sync members when in synchronous mode, the current node (its checks are always performed earlier)
and the candidate if required. If failover candidate exclusion is not requested and a candidate is specified
in the /failover key, return the candidate only.
```
- [[email protected] · patroni/ha.py:349-352](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L349-L352)
Excerpt:
```text
def acquire_lock(self) -> bool:
try:
ret = self.dcs.acquire_leader_lock()
except DCSError:
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F7
### F8 · Accurate · Factual · Promotion candidates must satisfy replica capacity requirements
Location: Article · exact quote · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=A%20replica%20cannot%20follow%20a,as%20max_connections%20and%20max_worker_processes%20.)
Article says:
```text
A replica cannot follow a primary with larger values for settings such as max_connections and max_worker_processes .
```
What is true:
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.
Charitable reading:
The claim concerns replicas that must continue recovery and serve the article's read traffic.
Review: We checked the hot_standby condition. F8 limits its conclusion to hot-standby recovery, consistent with the article's replicas serving reads. We checked whether these requirements apply without hot standby. The finding explicitly limits its conclusion to normal hot-standby recovery.
Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:717-719](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L717-L719)
Excerpt:
```text
When running a standby server, you must set this parameter to the
same or higher value than on the primary server. Otherwise, queries
will not be allowed in the standby server.
```
- [REL_18_6 · src/backend/access/transam/xlog.c:5445-5450](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L5445-L5450)
Excerpt:
```text
RecoveryRequiresIntParameter("max_connections",
MaxConnections,
ControlFile->MaxConnections);
RecoveryRequiresIntParameter("max_worker_processes",
max_worker_processes,
ControlFile->max_worker_processes);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F8
### F9 · Accurate · Factual · Promotion alone does not fence the old primary
Location: Article · exact quote · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=Promoting%20a%20replica%20while%20the,result%20in%20two%20writable%20primaries.)
Article says:
```text
Promoting a replica while the old primary is still writable can result in two writable primaries.
```
What is true:
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.
Charitable reading:
The article says simultaneous writable primaries can result, rather than claiming every promotion produces them.
Review: We tested whether promotion itself fences the former primary. The documentation requires a separate mechanism to prevent two primaries. We tested whether PostgreSQL promotion itself disables the former primary. The documentation requires a separate mechanism to prevent two primaries.
Sources:
- [REL_18_6 · doc/src/sgml/high-availability.sgml:1438-1443](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/high-availability.sgml#L1438-L1443)
Excerpt:
```text
If the primary server fails and the standby server becomes the
new primary, and then the old primary restarts, you must have
a mechanism for informing the old primary that it is no longer the primary. This is
sometimes known as <acronym>STONITH</acronym> (Shoot The Other Node In The Head), which is
necessary to avoid situations where both systems think they are the
primary, which will lead to confusion and ultimately data loss.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F9
### F10 · Accurate · Factual · Promotion must preserve the required WAL
Location: Article · exact quote · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=received%20and%20applied%20all%20the,we%20expect%20it%20to%20have.)
Article says:
```text
…received and applied all the WAL we expect it to have.
```
What is true:
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.
Charitable reading:
The required endpoint covers WAL the switchover promises to preserve, not every record a running primary might later generate.
Review: We distinguished available WAL from the required endpoint. F10 verifies the replay requirement without claiming PostgreSQL retrieves missing WAL automatically. We checked whether promotion retrieves every record from the former primary. The finding limits replay to available WAL and leaves endpoint enforcement unverified.
Sources:
- [REL_18_6 · src/backend/access/transam/xlogrecovery.c:3657-3665](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlogrecovery.c#L3657-L3665)
Excerpt:
```text
* Check to see if promotion is requested. Note that we do
* this only after failure, so when you promote, we still
* finish replaying as much as we can from archive and
* pg_wal before failover.
*/
if (StandbyMode && CheckForStandbyTrigger())
{
XLogShutdownWalRcv();
return XLREAD_FAIL;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F10
### F11 · Accurate · Factual · Patroni stops PostgreSQL during graceful demotion
Location: excerpt · section “Establishing a final WAL position” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=Patroni%2C%20a%20popular%20open%2Dsource%20Postgres,management%20tool%2C%20takes%20this%20approach.)
Article says:
```text
Patroni, a popular open-source Postgres cluster management tool, takes this approach.
```
What is true:
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.
Charitable reading:
The preceding sentence identifies stopping PostgreSQL as the approach under comparison.
Review: We followed the switchover call into graceful demotion. Its mode selects fast shutdown, and demotion calls the stop handler. We checked whether the stop call belongs only to failure handling. Requested switchover invokes graceful demotion with fast shutdown and checkpoint enabled.
Sources:
- [[email protected] · patroni/ha.py:1600-1600](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1600-L1600)
Excerpt:
```text
'graceful': dict(stop='fast', checkpoint=True, release=True, offline=False, async_req=False), # noqa: E241,E501
```
- [[email protected] · patroni/ha.py:1644-1644](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1644-L1644)
Excerpt:
```text
self.state_handler.stop(str(mode_control['stop']), checkpoint=bool(mode_control['checkpoint']),
```
- [[email protected] · patroni/ha.py:1761-1761](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1761-L1761)
Excerpt:
```text
ret = self._async_executor.try_run_async(f'{action}: demote', self.demote, ('graceful',))
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F11
### F12 · Accurate · Factual · Verified accurate: “Patroni can validate a candidate named by the operator…”
Location: excerpt · section “Establishing a final WAL position” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=Patroni%20can%20validate%20a%20candidate%20named%20by%20the%20operator)
Article says:
```text
Patroni can validate a candidate named by the operator…
```
What is true:
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.
Review: E-40 ends before the lag and timeline checks. Those checks exist in surrounding source, but the recorded citation supports fewer details. We inspected candidate filtering and surrounding eligibility checks. Patroni checks health and lag, with timeline checks controlled by configuration.
Sources:
- [[email protected] · patroni/ha.py:2492-2492](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L2492-L2492)
Excerpt:
```text
in the /failover key, return the candidate only.
```
- [[email protected] · patroni/ha.py:1407-1409](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1407-L1409)
Excerpt:
```text
for st in self.fetch_nodes_statuses(candidates):
not_allowed_reason = st.failover_limitation()
if not_allowed_reason:
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F12
### F13 · Accurate · Factual · Patroni supports election without a named successor
Location: excerpt · section “Establishing a final WAL position” · as fetched 2026-10-30 · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=let%20the%20eligible%20replicas%20choose%20through%20its%20distributed%20leader%20election.)
Article says:
```text
…let the eligible replicas choose through its distributed leader election.
```
What is true:
Patroni 4.1.5 compares eligible members when no successor is specified. A qualifying node then attempts to acquire the distributed leader lock.
Charitable reading:
The article describes an election among eligible replicas, without promising that every replica may participate.
Review: We checked eligibility filtering and lock acquisition. F13 claims an election among eligible members, not unrestricted participation or guaranteed promotion. We tested whether switchover requires an operator-selected successor. The manual path compares members, and qualifying nodes attempt leader-lock acquisition.
Sources:
- [[email protected] · patroni/ha.py:1492-1492](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1492-L1492)
Excerpt:
```text
return self._is_healthiest_node(members, check_replication_lag=False)
```
- [[email protected] · patroni/ha.py:1777-1778](https://github.com/patroni/patroni/blob/235fdb3990513c7852da8dc51e9cb92b6d0e4907/patroni/ha.py#L1777-L1778)
Excerpt:
```text
if self.is_healthiest_node():
if self.acquire_lock():
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F13
### F15 · Accurate · Factual · A sampled WAL position can become stale
Location: Article · exact quote · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=the%20primary%20is%20still%20running,WAL%20while%20we%27re%20doing%20this)
Article says:
```text
…the primary is still running and can keep generating WAL while we're doing this…
```
What is true:
P can generate additional WAL while writes continue. The backup documentation confirms that PostgreSQL records data changes in WAL before changing disk data.
Charitable reading:
The claim says WAL can advance while P runs. It does not claim every idle primary continuously generates WAL.
Review: We tested the idle-primary interpretation. F15 expressly assumes continuing writes, which can advance WAL beyond a sampled position. We tested the idle-primary counterexample. The finding requires continued writes and says WAL can advance, rather than asserting continuous advancement.
Sources:
- [https://planetscale.com/blog/postgres-backups-under-the-hood](https://planetscale.com/blog/postgres-backups-under-the-hood)
Excerpt:
```text
Before Postgres makes any changes to data on disk, it first records the changes in the WAL.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F15
### F16 · Accurate · Factual · Verified accurate: “…no further commit can be acknowledged unless R2 has flushed it.”
Location: Article · exact quote · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=no%20further%20commit%20can%20be,unless%20R2%20has%20flushed%20it.)
Article says:
```text
…no further commit can be acknowledged unless R2 has flushed it.
```
What is true:
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.
Review: E-51 establishes remote-flush semantics, not an instantaneous acknowledgment handover after disconnection. F16 must retain the article's R2 catch-up condition. We considered asynchronous overrides and additional eligible standbys. The finding explicitly assumes synchronous_commit=on and R2 as the sole remaining eligible standby.
Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:4910-4914](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L4910-L4914)
Excerpt:
```text
The keyword <literal>ANY</literal>, coupled with
<replaceable class="parameter">num_sync</replaceable>, specifies a
quorum-based synchronous replication and makes transaction commits
wait until their WAL records are replicated to <emphasis>at least</emphasis>
<replaceable class="parameter">num_sync</replaceable> listed standbys.
```
- [REL_18_6 · src/backend/replication/syncrep.c:719-726](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/syncrep.c#L719-L726)
Excerpt:
```text
/* Sort each array in descending order */
qsort(write_array, num_standbys, sizeof(XLogRecPtr), cmp_lsn);
qsort(flush_array, num_standbys, sizeof(XLogRecPtr), cmp_lsn);
qsort(apply_array, num_standbys, sizeof(XLogRecPtr), cmp_lsn);
/* Get Nth latest Write, Flush, Apply positions */
*writePtr = write_array[nth - 1];
*flushPtr = flush_array[nth - 1];
```
- [REL_18_6 · doc/src/sgml/config.sgml:3169-3248](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3169-L3248)
Qualification: Version note: PostgreSQL 18.6
Excerpt:
```text
commits wait until replies
from the current synchronous standby(s) indicate they have received
the commit record of the transaction and flushed it to durable storage.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F16
## Notes (not graded) (1)
### F14 · Note · · Note: “Queries that would have gone to the old primary must find their way to the new one.”
Location: Article · exact quote · [open in article](https://planetscale.com/blog/designing-a-planned-switchover-for-minimum-disruption#:~:text=Queries%20that%20would%20have%20gone,way%20to%20the%20new%20one.)
Article says:
```text
Queries that would have gone to the old primary must find their way to the new one.
```
What is true:
E-46 describes selecting shards from data topology. It does not establish how queries move from P to the promoted primary.
Explanation: Not graded: no reader would act differently on it.
Review: We checked whether shard selection establishes primary selection. E-46 describes choosing shards, without establishing routing changes between their database instances.
Sources:
- [https://planetscale.com/blog/what-is-a-neki-router](https://planetscale.com/blog/what-is-a-neki-router)
Excerpt:
```text
The Neki router builds the first plan using the data topology to decide which shard(s) receive the work
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c#F14
## Withdrawn findings (0)
None.
## Section checks
- Failure detection · A · 1 verified-accurate · 100% of claims (4 of 4, plus 2 that need data we do not have)
- Final WAL position · A · 9 verified-accurate · 100% of claims (14 of 14, plus 3 that need data we do not have)
- Synchronous replication · A · 3 verified-accurate · 100% of claims (5 of 5)
- Switchover phases · A · none · 100% of claims (1 of 1)
- Validation · A · 1 verified-accurate · 100% of claims (1 of 1)
- Durability guarantee · A · 1 verified-accurate · 100% of claims (1 of 1)
## Claim coverage
- Introduction: 2 of 2 Postgres claims checked, plus 2 that need data we do not have; not counted: 4 product or opinion, 3 not a claim
- Switchover phases: 1 of 1 Postgres claims checked; not counted: 6 product or opinion, 1 not a claim
- Failure detection: 4 of 4 Postgres claims checked, plus 2 that need data we do not have; not counted: 3 product or opinion
- Final WAL position: 14 of 14 Postgres claims checked, plus 3 that need data we do not have; not counted: 14 product or opinion, 1 duplicate, 3 not a claim
- Synchronous replication: 5 of 5 Postgres claims checked; not counted: 9 product or opinion, 2 duplicate, 2 not a claim
- Application behavior: no checkable claims; not counted: 15 product or opinion, 2 duplicate, 1 not a claim
- Validation: 1 of 1 Postgres claims checked; not counted: 11 product or opinion, 5 duplicate, 1 not a claim
- Timeout and rollback: 2 claims are the author's own account; nothing checkable; not counted: 6 product or opinion, 1 duplicate, 1 not a claim
- Durability guarantee: 1 of 1 Postgres claims checked; not counted: 2 product or opinion
- Summary: no checkable claims; not counted: 4 product or opinion, 1 duplicate, 2 not a claim
## What we did not check
- We did not verify Neki's Admin, Router, replication-slot preparation, or rollback implementation.
- We did not test Neki's end-to-end guarantee that every acknowledged commit survives a planned switchover.
- We did not measure buffering behavior or verify the claim that timeout rollback immediately restores service.
- The article names no PostgreSQL or Patroni release, so we could not establish its deployment's exact versions.
- We could not independently verify Neki's query buffering, rollback behavior, or acknowledged-commit guarantee.
- We did not verify historical changes to Neki's switchover implementation.
- We did not reach the account signup page.
- We did not verify Neki's buffering, rollback, fencing, or promotion implementation.
- We did not verify Patroni's candidate validation or rewind behavior.
- We did not test the configuration reload or transaction-default behavior.
- We could not corroborate the complete switchover sequence against 5 independent primary sources.
- Transparent: we did not complete every applicable check.
- Transparent: claims sourced check did not finish.
- Transparent: claims dated check did not finish.
- Transparent: interest disclosed check did not finish.
- We hold no source mapping for “Neki”, so we did not check the article's claims about its code.
- No fenced or preformatted code blocks were identified. Inline snippets and other setup instructions were not checked for syntax.
## Notes
- Central claim not verified. The findings check PostgreSQL prerequisites, but do not establish Neki's buffering, rollback, or complete acknowledged-commit guarantee.
- We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.
- Average of 5 axes: 4 · central claim not backed by evidence, at most A− · result A-
- Some explanatory text is not shown in this edition; the grade and findings are complete.
- Some checks did not happen for this edition, and each one we know of is listed above.
- Checked against: github.com/postgres/postgres REL_18_6 at commit 724edf9bde9d356724ad384a2e196edc3c9f80f7 (pinned target); github.com/patroni/patroni v4.1.5 at commit 235fdb3990513c7852da8dc51e9cb92b6d0e4907 (pinned target); https://planetscale.com/blog/author/shlomi (fetched 2026-10-30T12:18:14.914740Z); https://planetscale.com/blog/postgres-backups-under-the-hood (fetched 2026-10-30T12:18:23.148034Z); https://planetscale.com/blog/what-is-a-neki-router (fetched 2026-10-30T12:18:25.168238Z); https://planetscale.com/neki (fetched 2026-10-30T12:18:19.033964Z).
- Article captured 2026-10-30T12:17:57.986101Z · SHA-256 9e8dc6536f97570e62370681d075a3e3f56f18416c6c43bc5d0d4131624ffc28 · Text extracted from the article's HTML.
- Policy SHA-256 81966943da9c2928567541e80df8e27dd4e20e8b385eaa8394ae0418a52ef0e8 · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not verify Neki's Admin, Router, fencing, replication-slot preparation, promotion, or rollback implementation.
- We did not test whether every acknowledged commit survives Neki's complete planned switchover.
- We did not measure query buffering or test whether timeout rollback immediately restores service.
- We did not verify historical changes to Neki's switchover implementation.
- The article names no PostgreSQL or Patroni release. We checked PostgreSQL 18.6 and Patroni 4.1.5.
- We did not verify Patroni's rewind behavior.
- We did not test configuration reloads or transaction-default changes.
- We did not reach the account signup page.
- The article contains no identified code blocks. We did not check inline configuration snippets for syntax.
- The article gives October 29, 2026 without a time. We list that date at midnight UTC.
- source: patroni names no release in the article, so it was read at 4.1.5, the latest at fetch time
- source: we did not check the article's claims about Neki against its source code, because we keep no copy of it
- review: the findings were written by one model and reviewed independently by a different model.
- 5 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, 2 pinned source trees, and 4 fetched pages.
- 13 survived · 3 weakened · 0 withdrawn.
## Edition changes
- F1 · recalibrated.
- F2 · recalibrated.
- F3 · recalibrated.
- F4 · recalibrated.
- F5 · recalibrated.
- F6 · recalibrated.
- F7 · recalibrated.
- F8 · recalibrated.
- F9 · recalibrated.
- F10 · recalibrated.
- F11 · recalibrated.
- F12 · weakened.
- F13 · recalibrated.
- F14 · weakened.
- F15 · recalibrated.
- F16 · weakened.
## Revision history
- [Revision 1](https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c?v=2) · 2026-10-30 07:07 UTC · A- · audit version not recorded · regrade version not recorded
Article as first submitted. 16 accurate · 0 wrong · 0 caveats.
ElephantSeal: A-. Open: the central claim is not yet backed by evidence.
Changes: First audit. Open: none.
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/7f0b4606-8cbe-44b2-8c50-9efda14a890c?v=4) · this page · 2026-10-30 12:17 UTC · A- · audited with v1.1.3
Same article text, re-audited. 15 accurate · 0 wrong · 0 caveats.
ElephantSeal: A-. Open: the central claim is not yet backed by evidence.
Changes: No change in findings.