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

Commit432fbea

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 parent3e859b3 commit432fbea

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
@@ -336,9 +336,13 @@
336336
# Create a temporary directory in the system location.
337337
my$sys_tempdir = PostgreSQL::Test::Utils::tempdir_short;
338338

339-
rename("$pgdata/pg_replslot","$sys_tempdir/pg_replslot")
339+
# On Windows use the short location to avoid path length issues.
340+
# Elsewhere use $tempdir to avoid file system boundary issues with moving.
341+
my$tmploc =$windows_os ?$sys_tempdir :$tempdir;
342+
343+
rename("$pgdata/pg_replslot","$tmploc/pg_replslot")
340344
or BAIL_OUT"could not move$pgdata/pg_replslot";
341-
dir_symlink("$sys_tempdir/pg_replslot","$pgdata/pg_replslot")
345+
dir_symlink("$tmploc/pg_replslot","$pgdata/pg_replslot")
342346
or BAIL_OUT"could not symlink to$pgdata/pg_replslot";
343347

344348
$node->start;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp