049_wait_for_lsn.pl: create function and procedure at once

Alexander Korotkov <akorotkov@postgresql.org>

Commit: 23cbadeeb4738b8f5e615f0c5a2ef7af6111d512
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2026-04-20T10:05:55Z
049_wait_for_lsn.pl: create function and procedure at once

Create the PL/pgSQL function and procedure for the top-level WAIT FOR
checks in a single transaction, then wait once for standby replay before
running both tests.  Also revise some surrounding comments.

This avoids an extra 'wait_for_catchup()' on the delayed standby without
changing the test coverage.

Discussion: https://postgr.es/m/CABPTF7WZ1yuYz8V%3Dxsbghg8e7qaAm5MpyNw6BthWcbN7%2BP6biw%40mail.gmail.com
Author: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>

Files

PathChange+/−
src/test/recovery/t/049_wait_for_lsn.pl modified +11 −13

Discussion