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

Appearance settings

Commit e9f15bc

Browse filesBrowse files
committed
Fix tmpdir issues with commit e213de8
Commit e213de8 fixed a problem with path lengths to a tempdir on Windows, but caused problems on at least some Unix systems where the system tempdir is on a different file system. To work around this, only used 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 parent e213de8 commit e9f15bc
Copy full SHA for e9f15bc

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/bin/pg_basebackup/t/010_pg_basebackup.pl
+6-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.