What Promotion Admits: Acknowledged-Write Loss on PostgreSQL HA Promotion Paths When the Candidate Is Missing WAL

A lag setting, such as Patroni's maximum_lag_on_failover, is naturally read as a bound on how much acknowledged data a failover can lose; we measured what each promotion path of three widely used stacks actually admits when the candidate replica has not received 10 MiB or 100 MiB of WAL: Patroni 4.1.5, pg_auto_failover 2.2 and CloudNativePG 1.30.2. We built each gap by stalling WAL shipping while the primary kept accepting writes, verified it per run against the primary's and the candidate's LSNs, killed the primary, and recomputed every acknowledged-write loss from stored lists of acknowledged and surviving transaction ids. Across 300 valid runs on three single-host rigs, the stacks gave three different answers. Patroni's operator-initiated patronictl failover, with the leader gone and a named candidate, promoted silently in 40 of 40 runs and lost the whole gap (up to 11,898 acknowledged transactions at 100 MiB), while its automatic path refused 20 of 20 slowly formed gaps but, in a supplementary burst cell, promoted silently in 10 of 10 runs: the leader position stored in the DCS lagged the candidate's own position by 24 to 287 MiB, so the computed lag was negative in 10 of 10 runs. pg_auto_failover, when configured for asynchronous replication, gated both automatic and operator promotion at 16 MiB on last-reported LSNs: a 10 MiB gap passed silently in every run and a 100 MiB gap was refused in every run, with the refusal reason visible only in the monitor log; a direct pg_promote() bypassed the gate at both sizes. CloudNativePG showed no lag gate on any measured path: automatic failover promoted silently in 10 of 10 runs at 100 MiB and lost 11,763 to 11,778 acknowledged transactions. In these three stacks, a lag setting bounds loss only on the path that consults it, and only when the position it compares against is fresh. All results come from one host per stack, asynchronous replication, and one version per stack.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-23
DOI
https://doi.org/10.5281/zenodo.24466482
Primary Topic
Distributed systems and fault tolerance
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

What Promotion Admits: Acknowledged-Write Loss on PostgreSQL HA Promotion Paths When the Candidate Is Missing WAL

Sajish Krishnan
Zenodo (CERN European Organization for Nuclear Research)
Distributed systems and fault tolerance
preprint

What Promotion Admits: Acknowledged-Write Loss on PostgreSQL HA Promotion Paths When the Candidate Is Missing WAL

Sajish Krishnan
preprint en

Abstract

A lag setting, such as Patroni's maximum_lag_on_failover, is naturally read as a bound on how much acknowledged data a failover can lose; we measured what each promotion path of three widely used stacks actually admits when the candidate replica has not received 10 MiB or 100 MiB of WAL: Patroni 4.1.5, pg_auto_failover 2.2 and CloudNativePG 1.30.2. We built each gap by stalling WAL shipping while the primary kept accepting writes, verified it per run against the primary's and the candidate's LSNs, killed the primary, and recomputed every acknowledged-write loss from stored lists of acknowledged and surviving transaction ids. Across 300 valid runs on three single-host rigs, the stacks gave three different answers. Patroni's operator-initiated patronictl failover, with the leader gone and a named candidate, promoted silently in 40 of 40 runs and lost the whole gap (up to 11,898 acknowledged transactions at 100 MiB), while its automatic path refused 20 of 20 slowly formed gaps but, in a supplementary burst cell, promoted silently in 10 of 10 runs: the leader position stored in the DCS lagged the candidate's own position by 24 to 287 MiB, so the computed lag was negative in 10 of 10 runs. pg_auto_failover, when configured for asynchronous replication, gated both automatic and operator promotion at 16 MiB on last-reported LSNs: a 10 MiB gap passed silently in every run and a 100 MiB gap was refused in every run, with the refusal reason visible only in the monitor log; a direct pg_promote() bypassed the gate at both sizes. CloudNativePG showed no lag gate on any measured path: automatic failover promoted silently in 10 of 10 runs at 100 MiB and lost 11,763 to 11,778 acknowledged transactions. In these three stacks, a lag setting bounds loss only on the path that consults it, and only when the position it compares against is fresh. All results come from one host per stack, asynchronous replication, and one version per stack.

Zenodo (CERN European Organization for Nuclear Research)
Distributed systems and fault tolerance
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon