database: a planned keel database promote leaves the old PostgreSQL primary diverged, by its shutdown checkpoint #163
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel#163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on real nodes on 2026-10-15 (keel 0.23.21, etcd of 3 members, handbook decision 0057).
What happened
A was 9062, the primary, with
FIRST 1 (keel). B was 9054, the synchronous standby. A co-located writer on A wrote every 0.35 s. On B, at 1792062057.44:Timeline:
Stopping postgresql@17-main(the fence restart)Stopped postgresql@17-mainB's
00000003.history: timeline 2 ends at0/385CAB0. A'spg_controldata: latest checkpoint location0/385CAB0, timeline 2. Thus A holds 1 record that B never got: the shutdown checkpoint that A wrote at its stop, after B promoted.All 16 writes that A acknowledged (100000 to 100015) are on B. No data is lost. But A needs a confirmed reseed (
keel spec apply --system-only --destroy-local-database, 10.8 s). Until then, B has no standby, and every commit on B waits (0054). The writer on B got 4 writes killed after 30 s each.Expected
A planned promote waits until the old primary has stopped and the standby has received the old primary's last WAL record (its shutdown checkpoint), then promotes. Then the old primary follows the new one with no divergence and no reseed. This is the path of
docs/vip.md, "Upgrading a pair without downtime".