Fix recovery target test waiting on unavailable WAL Buildfarm member skink reported a failure in recovery/003_recovery_targets after commit d5751c33cc3. The newly added recovery_target_xid set-then-cleared test could time out while waiting for pg_last_wal_replay_lsn() to reach the expected LSN.
The test recorded lsn6 after calling pg_switch_wal(). As a result, lsn6 pointed into the next WAL segment, but pg_switch_wal() only archived the previous one. Since the standby in this test restores WAL from the archive only, it could not obtain the segment containing lsn6 and waited indefinitely. Fix this by recording lsn6 before calling pg_switch_wal(), so the archived WAL contains the LSN that the standby is waiting for. Per buildfarm member skink. Reported-by: Álvaro Herrera <[email protected]> Author: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/83486b6a65aa48ed18e4e872d5e0fb5b0bfaca41 Modified Files -------------- src/test/recovery/t/003_recovery_targets.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
