pg.ddx.io  patroni/patroni GitHub issues and pull requests  
help / color / mirror / Atom feed
From: sgdanawe (@sgdanawe) <noreply+sgdanawe@github.com>
To: patroni/patroni <noreply+patroni-patroni@github.com>
Subject: Re: [patroni/patroni] PR #3803: Ignore peers on an older timeline when choosing the healthiest node
Date: Wed, 18 Nov 2026 10:11:28 +0000
Message-ID: <gh-patroni-patroni-3803-c6975453035@github.com> (raw)
In-Reply-To: <gh-patroni-patroni-3803@github.com>
References: <gh-patroni-patroni-3803@github.com>

Thanks for the review. Pushed an update:

1. Equal LSN: whether a peer can promote is now decided once, before the LSN comparison. An old-timeline peer at our LSN is no longer added to eligible_members, so it can't make us defer through failover_priority or the site checks.
2. Unknown timeline: a peer with no timeline is treated as unable to promote, the same as in is_failover_possible() and the local "Can not figure out my timeline" check.

I used the shape you suggested. The "Primary is still alive" check still runs first, and the timeline is only used to skip a peer that is ahead or to exclude it from eligible_members. A peer that is behind us still gives its quorum vote.

Tests added or updated:
- equal LSN with a higher failover_priority
- the multi-site cases (current site and requested site)
- a running primary on an old timeline still blocking
- an old-timeline voter that is behind still giving its quorum vote

The old assertion that an unknown-timeline peer ahead of us blocks is now flipped, per point 2. tests/test_ha.py passes.

view thread (15+ messages)  latest in thread

Message-ID: <gh-patroni-patroni-3803-c6975453035@github.com>
Permalink:  ../gh-patroni-patroni-3803-c6975453035@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox