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

Commit2b917a5

Browse files
committed
Clean up pg_rewind regression test script.
Since commit01f6bb4, TestLib.pm has exported path to tmp_check directory,so let's use that also for the pg_rewind test clusters etc.Also, in master, the $tempdir_short variable has not been used since commit13d856e, which moved the initdb-running code to TestLib.pm.Backpatch to 9.5.
1 parent642ae4e commit2b917a5

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

‎src/bin/pg_rewind/RewindTest.pm

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,8 @@ our @EXPORT = qw(
6262
clean_rewind_test
6363
);
6464

65-
# A temporary directory created with 'tempdir' is deleted automatically at
66-
# the end of the tests. You can change it to a constant if you need to keep it
67-
# for debugging purposes,
68-
my$testroot = tempdir;
69-
70-
our$test_master_datadir ="$testroot/data_master";
71-
our$test_standby_datadir ="$testroot/data_standby";
72-
73-
mkdir$testroot;
65+
our$test_master_datadir ="$tmp_check/data_master";
66+
our$test_standby_datadir ="$tmp_check/data_standby";
7467

7568
# Define non-conflicting ports for both nodes.
7669
my$port_master =$ENV{PGPORT};
@@ -273,9 +266,8 @@ sub run_pg_rewind
273266

274267
# Keep a temporary postgresql.conf for master node or it would be
275268
# overwritten during the rewind.
276-
copy(
277-
"$test_master_datadir/postgresql.conf",
278-
"$testroot/master-postgresql.conf.tmp");
269+
copy("$test_master_datadir/postgresql.conf",
270+
"$tmp_check/master-postgresql.conf.tmp");
279271

280272
# Now run pg_rewind
281273
if ($test_modeeq"local")
@@ -307,9 +299,8 @@ sub run_pg_rewind
307299
}
308300

309301
# Now move back postgresql.conf with old settings
310-
move(
311-
"$testroot/master-postgresql.conf.tmp",
312-
"$test_master_datadir/postgresql.conf");
302+
move("$tmp_check/master-postgresql.conf.tmp",
303+
"$test_master_datadir/postgresql.conf");
313304

314305
# Plug-in rewound node to the now-promoted standby node
315306
append_to_file(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp