Make 030_pg_recvlogical robust against PID reuse

The reconnection test assumed that a restarted walsender would always
have a different PID from the previous one. On some platforms, however,
PIDs can be reused quickly, causing the test to time out even though
pg_recvlogical has successfully reconnected.

This issue was reported by buildfarm member fairywren:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2026-07-30%2009%3A58%3A12

Fix this by waiting for the server log message indicating that the
logical replication slot has been acquired again, rather than relying on
a PID change.

Backpatch to v19, where the affected reconnection test was introduced by
commit d89b1d817513.

Author: Hayato Kuroda <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: 
https://postgr.es/m/os9pr01mb121497cf10dff54f745e37204f5...@os9pr01mb12149.jpnprd01.prod.outlook.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/44056f6493ac11ddabbae31098398af71b563904

Modified Files
--------------
src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Reply via email to