]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Stabilize 019_replslot_limit.pl: wait on slot restart_lsn
authorAlexander Korotkov <akorotkov@postgresql.org>
Tue, 26 May 2026 23:54:04 +0000 (02:54 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Tue, 26 May 2026 23:54:04 +0000 (02:54 +0300)
commitcdb1d1cf1de63b5dfecd5ebb23fd277b0e767f57
tree071b1130e37c01c34524339dfb25060960fa34a8
parentbec61f59354e652598b4c8b52b4c022ebb616230
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 <exclusion@gmail.com>
Discussion: https://postgr.es/m/63f6abc9-c0ae-465d-a4e6-667eca6ea008@gmail.com
Author: Xuneng Zhou <xunengzhou@gmail.com>
Author: Alexander Korotkov <aekorotkov@gmail.com>
src/test/recovery/t/019_replslot_limit.pl