public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alexander Korotkov <[email protected]>
To: [email protected]
Subject: pgsql: Stabilize 019_replslot_limit.pl: wait on slot restart_lsn
Date: Wed, 27 May 2026 00:10:01 +0000
Message-ID: <[email protected]> (raw)

Stabilize 019_replslot_limit.pl: wait on slot restart_lsn

wait_for_catchup() has "wait for the standby to reach the target LSN"
semantics.  However, the previous polling implementation actually waited for
the primary to observe that position via pg_stat_replication.
7e8aeb9e483 introduced the new WAIT FOR LSN-based implementation, which
just probes the standby.

019_replslot_limit.pl relied on the old side effect: its
"slot state changes to extended/unreserved" subtests inspect
primary-side pg_replication_slots, whose wal_status depends on
restart_lsn, which only advances after the walsender processes a
standby reply.  Make the test wait on what it actually needs by
replacing each wait_for_catchup() with
wait_for_slot_catchup('rep1', 'restart', primary->lsn('write')).

Reported-by: Alexander Lakhin <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Author: Xuneng Zhou <[email protected]>
Author: Alexander Korotkov <[email protected]>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cdb1d1cf1de63b5dfecd5ebb23fd277b0e767f57

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)



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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Stabilize 019_replslot_limit.pl: wait on slot restart_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