feat: with etcd, an expired lease states the old PostgreSQL primary gone (keel#165) #170
No reviewers
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!170
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/pg-expired-lease-alone-165"
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?
Fixes #165. The maintainer decided it on 2026-10-15 ("sim"); handbook 0054, amendment of 2026-10-15 (handbook#79).
With etcd, an automatic failover moved the VIP, but the new PostgreSQL primary took no write until the operator ran
keel database promote --old-primary-gone(evidencedocs/evidence/2026-10-15-br3-thin-etcd-witness.md, section 5).Change
/var/lib/keel/database/old-primary-gone, with the epoch of the claim, before it records the claim. The follow that the claim starts then promotes the standby and commits alone.keel database followtakes a statement with no epoch (the operator's) or one for the epoch of the newest claim. It removes a statement of another epoch unused.Tests
TestTheOldPrimaryGoneintests/test_mesh_vipetcd.py(expired, revoked, never seen alive, reclaim, the bridge), and 2 tests intests/test_system_dbpgfollow.py(the statement of this claim, a stale statement).tests/postgres_netns.pynow runs with no operator promote. B's controller claims when A's lease expired, B commits alone, and the bound of 5 s from the VIP holds.31cae50205312e2db482