Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit54a5ed2

Browse files
committed
Further refinement of stuck_on_old_timeline recovery test
TestLib::perl2host can take a file argument as well as a directoryargument, so that code becomes substantially simpler. Also add commentson why we're using forward slashes, and why we're settingPERL_BADLANG=0.Discussion:https://postgr.es/m/e9947bcd-20ee-027c-f0fe-01f736b7e345@dunslane.net
1 parent817bb0a commit54a5ed2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,20 @@
2424
# the timeline history file reaches the archive but before any of the WAL files
2525
# get there.
2626
$node_primary->init(allows_streaming=> 1,has_archiving=> 1);
27-
my$perlbin = $^X;
28-
if ($^Oeq'msys')
29-
{
30-
$perlbin = TestLib::perl2host(dirname($^X)) .'\\' . basename($^X);
31-
}
27+
28+
# Note: consistent use of forward slashes here avoids any escaping problems
29+
# that arise from use of backslashes. That means we need to double-quote all
30+
# the paths in the archive_command
31+
my$perlbin = TestLib::perl2host($^X);
3232
$perlbin =~s!\\!/!gif$TestLib::windows_os;
3333
my$archivedir_primary =$node_primary->archive_dir;
3434
$archivedir_primary =~s!\\!/!gif$TestLib::windows_os;
3535
$node_primary->append_conf('postgresql.conf',qq(
3636
archive_command = '"$perlbin" "$FindBin::RealBin/cp_history_files" "%p" "$archivedir_primary/%f"'
3737
wal_keep_size=128MB
3838
));
39+
# Make sure that Msys perl doesn't complain about difficulty in setting locale
40+
# when called from the archive_command.
3941
local$ENV{PERL_BADLANG}=0;
4042
$node_primary->start;
4143

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp