aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2023-07-08 11:21:58 -0400
committerAndrew Dunstan <andrew@dunslane.net>2023-07-08 11:46:09 -0400
commit3e859b3d7af1b249e89d5e8e25a6f4b678624238 (patch)
tree7171eb360279aea50f4350d5849cdad88f63103a /src
parentd12d1a9278dfd40694ef98fe8bc9e2d07fd1000e (diff)
downloadpostgresql-3e859b3d7af1b249e89d5e8e25a6f4b678624238.tar.gz
postgresql-3e859b3d7af1b249e89d5e8e25a6f4b678624238.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_basebackup/t/010_pg_basebackup.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index d4d14c11bf2..da0fb9f3bd8 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -333,19 +333,20 @@ umask(0027);
# Enable group permissions on PGDATA
chmod_recursive("$pgdata", 0750, 0640);
-rename("$pgdata/pg_replslot", "$tempdir/pg_replslot")
+# Create a temporary directory in the system location.
+my $sys_tempdir = PostgreSQL::Test::Utils::tempdir_short;
+
+rename("$pgdata/pg_replslot", "$sys_tempdir/pg_replslot")
or BAIL_OUT "could not move $pgdata/pg_replslot";
-dir_symlink("$tempdir/pg_replslot", "$pgdata/pg_replslot")
+dir_symlink("$sys_tempdir/pg_replslot", "$pgdata/pg_replslot")
or BAIL_OUT "could not symlink to $pgdata/pg_replslot";
$node->start;
# Test backup of a tablespace using tar format.
-# Create a temporary directory in the system location and symlink it
-# to our physical temp location. That way we can use shorter names
-# for the tablespace directories, which hopefully won't run afoul of
-# the 99 character length limit.
-my $sys_tempdir = PostgreSQL::Test::Utils::tempdir_short;
+# Symlink the system located tempdir to our physical temp location.
+# That way we can use shorter names for the tablespace directories,
+# which hopefully won't run afoul of the 99 character length limit.
my $real_sys_tempdir = "$sys_tempdir/tempdir";
dir_symlink "$tempdir", $real_sys_tempdir;