postgres.git / summary / log / commit / refs

commit    bc9d706a19629a03180887bfa061a9a0ec6f5d7e
Author:   Andrew Dunstan <andrew@dunslane.net>
Date:     Wed Jul 17 14:35:50 2024 +0000
First released in: 18.0, 12.20, 13.16, 14.13, 15.8, 16.4, 17.0

    Avoid error in recovery test if history file is not yet present
    
    Error was detected when testing use of libpq sessions instead of psql
    for polling queries.
    
    Discussion: https://postgr.es/m/e86b6d2d-20d8-4ac9-9a98-165fff7db886@dunslane.net
    
    Backpatch to all live branches


src/test/recovery/t/002_archiving.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl index d69da4e5efd..2332bb4f242 100644 --- a/src/test/recovery/t/002_archiving.pl +++ b/src/test/recovery/t/002_archiving.pl @@ -96,7 +96,7 @@ $node_standby->promote; # creating a RECOVERYHISTORY. my $primary_archive = $node_primary->archive_dir; $caughtup_query = - "SELECT size IS NOT NULL FROM pg_stat_file('$primary_archive/00000002.history')"; + "SELECT size IS NOT NULL FROM pg_stat_file('$primary_archive/00000002.history', true)"; $node_primary->poll_query_until('postgres', $caughtup_query) or die "Timed out while waiting for archiving of 00000002.history"; [parent: 11441ad48d09]