fix: a PostgreSQL standby caught up after the reseed may take the VIP again (keel#166) #172
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!172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/pg-reseed-clears-vip-fence-166"
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 #166. Stacked on #171: merge #170 and #171 first.
After an automatic failover, the old holder is fenced in its VIP state, and a fenced node never claims by itself (0049). The confirmed reseed did not clear that fence. On real nodes the second automatic failover did not come.
Change
keel database followclears the fence of a PostgreSQL standby that streams from the holder and received all that the holder flushed. The holder's flushed position comes first, fromIDENTIFY_SYSTEM, then the standby's received position. "Caught up", not only "streaming": a commit that the holder acknowledged alone (#165) is then on this node too.keel database watchruns follow on a fenced PostgreSQL standby that streams. So a node that is fenced now (9062 on BR2) is cleared at its first watch run after the upgrade.Tests
RED first: 4 tests in
tests/test_system_dbpgfollow.py(caught up, behind, holder silent, reseed) and 1 intests/test_system_dbfollow.py(the watch). netns: the reseeded old primary is not fenced within 3 watch runs.10ea05501f220f9238e5220f9238e585a6d3ceaf