Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9d97c34

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 a9e0b3b commit 9d97c34

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

+2-2
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_size=128MB
@@ -81,8 +82,7 @@
8182
# WAL segment, this is enough to guarantee that the history file was
8283
# archived.
8384
my $archive_wait_query =
84-
"SELECT coalesce('$walfile_to_be_archived' <= last_archived_wal, false) " .
85-
"FROM pg_stat_archiver";
85+
"SELECT '$walfile_to_be_archived' <= last_archived_wal FROM pg_stat_archiver";
8686
$node_standby->poll_query_until('postgres', $archive_wait_query)
8787
or die "Timed out while waiting for WAL segment to be archived";
8888
my $last_archived_wal_file = $walfile_to_be_archived;

0 commit comments

Comments
 (0)