Skip to content

Commit e213de8

Browse files
committed
Use shorter location for pg_replslot in pg_basebackup test
The symlink to a longer location tripped up some Windows limit on buildfarm animal fairywren when running with meson, which uses slightly longer paths. Backpatch to release 14 to keep the script in sync. Before that the script skipped all symlink related tests on Windows.
1 parent 6ee01e2 commit e213de8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

+8-7
Original file line numberDiff line numberDiff line change
@@ -339,19 +339,20 @@
339339
# Enable group permissions on PGDATA
340340
chmod_recursive("$pgdata", 0750, 0640);
341341

342-
rename("$pgdata/pg_replslot", "$tempdir/pg_replslot")
342+
# Create a temporary directory in the system location.
343+
my $sys_tempdir = PostgreSQL::Test::Utils::tempdir_short;
344+
345+
rename("$pgdata/pg_replslot", "$sys_tempdir/pg_replslot")
343346
or BAIL_OUT "could not move $pgdata/pg_replslot";
344-
dir_symlink("$tempdir/pg_replslot", "$pgdata/pg_replslot")
347+
dir_symlink("$sys_tempdir/pg_replslot", "$pgdata/pg_replslot")
345348
or BAIL_OUT "could not symlink to $pgdata/pg_replslot";
346349

347350
$node->start;
348351

349352
# Test backup of a tablespace using tar format.
350-
# Create a temporary directory in the system location and symlink it
351-
# to our physical temp location. That way we can use shorter names
352-
# for the tablespace directories, which hopefully won't run afoul of
353-
# the 99 character length limit.
354-
my $sys_tempdir = PostgreSQL::Test::Utils::tempdir_short;
353+
# Symlink the system located tempdir to our physical temp location.
354+
# That way we can use shorter names for the tablespace directories,
355+
# which hopefully won't run afoul of the 99 character length limit.
355356
my $real_sys_tempdir = "$sys_tempdir/tempdir";
356357
dir_symlink "$tempdir", $real_sys_tempdir;
357358

0 commit comments

Comments
 (0)