Skip to content

Commit 84cb4be

Browse files
committed
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.
1 parent 1df6bee commit 84cb4be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/recovery/t/025_stuck_on_old_timeline.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
}
3232
$perlbin =~ s!\\!/!g if $TestLib::windows_os;
3333
my $archivedir_primary = $node_primary->archive_dir;
34+
$archivedir_primary =~ s!\\!/!g if $TestLib::windows_os;
3435
$node_primary->append_conf('postgresql.conf', qq(
3536
archive_command = '"$perlbin" "$FindBin::RealBin/cp_history_files" "%p" "$archivedir_primary/%f"'
3637
wal_keep_segments=8
@@ -92,8 +93,7 @@
9293
# WAL segment, this is enough to guarantee that the history file was
9394
# archived.
9495
my $archive_wait_query =
95-
"SELECT coalesce('$walfile_to_be_archived' <= last_archived_wal, false) " .
96-
"FROM pg_stat_archiver";
96+
"SELECT '$walfile_to_be_archived' <= last_archived_wal FROM pg_stat_archiver";
9797
$node_standby->poll_query_until('postgres', $archive_wait_query)
9898
or die "Timed out while waiting for WAL segment to be archived";
9999
my $last_archived_wal_file = $walfile_to_be_archived;

0 commit comments

Comments
 (0)