pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #3975: fix: fix flaky replication restart tests by waiting for confirmed_flush_lsn
Date: Thu, 19 Mar 2026 10:55:33 +0000
Message-ID: <[email protected]> (raw)
The replicationRestartFromLastFeedbackPosition* tests were flaky because they called forceUpdateStatus() and then immediately closed the replication connection. forceUpdateStatus() only flushes the status update to the TCP socket — if the walsender has not read it before the connection is closed, the slot's confirmed_flush_lsn is not advanced and the slot replays from an earlier position on restart.
Fix: after forceUpdateStatus(), poll pg_replication_slots until confirmed_flush_lsn matches the expected value before closing the connection. This ensures the server has processed the feedback.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #3975: fix: fix flaky replication restart tests by waiting for confirmed_flush_lsn
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox