aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2021-06-13 07:10:41 -0400
committerAndrew Dunstan <andrew@dunslane.net>2021-06-13 07:19:34 -0400
commit9d97c3408319b43718e4b85bc694697db1af32c6 (patch)
treebef0b0384255ebca7f18c3feb7016719bfe1441a
parenta9e0b3b08fe38d5e31f03ea96859ff5e413d4a38 (diff)
downloadpostgresql-9d97c3408319b43718e4b85bc694697db1af32c6.tar.gz
postgresql-9d97c3408319b43718e4b85bc694697db1af32c6.zip
Further tweaks to stuck_on_old_timeline recovery test
Translate path slashes on target directory path. This was confusing old branches, but is applied to all branches for the sake of uniformity. Perl is perfectly able to understand paths with forward slashes. Along the way, restore the previous archive_wait query, for the sake of uniformity with other tests, per gripe from Tom Lane.
-rw-r--r--src/test/recovery/t/025_stuck_on_old_timeline.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/recovery/t/025_stuck_on_old_timeline.pl b/src/test/recovery/t/025_stuck_on_old_timeline.pl
index 1eb4cae199f..e4e58cb8ab9 100644
--- a/src/test/recovery/t/025_stuck_on_old_timeline.pl
+++ b/src/test/recovery/t/025_stuck_on_old_timeline.pl
@@ -31,6 +31,7 @@ if ($^O eq 'msys')
}
$perlbin =~ s!\\!/!g if $TestLib::windows_os;
my $archivedir_primary = $node_primary->archive_dir;
+$archivedir_primary =~ s!\\!/!g if $TestLib::windows_os;
$node_primary->append_conf('postgresql.conf', qq(
archive_command = '"$perlbin" "$FindBin::RealBin/cp_history_files" "%p" "$archivedir_primary/%f"'
wal_keep_size=128MB
@@ -81,8 +82,7 @@ $node_standby->safe_psql('postgres', 'SELECT pg_switch_wal()');
# WAL segment, this is enough to guarantee that the history file was
# archived.
my $archive_wait_query =
- "SELECT coalesce('$walfile_to_be_archived' <= last_archived_wal, false) " .
- "FROM pg_stat_archiver";
+ "SELECT '$walfile_to_be_archived' <= last_archived_wal FROM pg_stat_archiver";
$node_standby->poll_query_until('postgres', $archive_wait_query)
or die "Timed out while waiting for WAL segment to be archived";
my $last_archived_wal_file = $walfile_to_be_archived;