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

Commite9f15bc

Browse files
committed
Fix tmpdir issues with commite213de8
Commite213de8 fixed a problem with path lengths to a tempdir onWindows, but caused problems on at least some Unix systems where thesystem tempdir is on a different file system. To work around this, onlyused the system temdir for the destination of pg_replslot on Windows,and otherwise restore the old behaviour.Backpatch to relase 14 like the previous patch.Problem exposed by a myriad of buildfarm animals.
1 parente213de8 commite9f15bc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/bin/pg_basebackup/t/010_pg_basebackup.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,13 @@
342342
# Create a temporary directory in the system location.
343343
my$sys_tempdir = PostgreSQL::Test::Utils::tempdir_short;
344344

345-
rename("$pgdata/pg_replslot","$sys_tempdir/pg_replslot")
345+
# On Windows use the short location to avoid path length issues.
346+
# Elsewhere use $tempdir to avoid file system boundary issues with moving.
347+
my$tmploc =$windows_os ?$sys_tempdir :$tempdir;
348+
349+
rename("$pgdata/pg_replslot","$tmploc/pg_replslot")
346350
or BAIL_OUT"could not move$pgdata/pg_replslot";
347-
dir_symlink("$sys_tempdir/pg_replslot","$pgdata/pg_replslot")
351+
dir_symlink("$tmploc/pg_replslot","$pgdata/pg_replslot")
348352
or BAIL_OUT"could not symlink to$pgdata/pg_replslot";
349353

350354
$node->start;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp