aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/t/RewindTest.pm
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-07-30 15:26:25 +0900
committerMichael Paquier <michael@paquier.xyz>2023-07-30 15:26:25 +0900
commitbf227926d22b5cffba4b6724df0eb239a7037cbd (patch)
treece46264b70e75181eb1fbde58a91615215677217 /src/bin/pg_rewind/t/RewindTest.pm
parentb68e356a680ee1155b0dc612a89655e98320121a (diff)
downloadpostgresql-bf227926d22b5cffba4b6724df0eb239a7037cbd.tar.gz
postgresql-bf227926d22b5cffba4b6724df0eb239a7037cbd.zip
Fix pg_rewind with in-place tablespaces when source is remote
libpq_source.c would consider any result returned by pg_tablespace_location() as a symlink, resulting in run-time errors like that: pg_rewind: error: file "pg_tblspc/NN" is of different type in source and target In-place tablespaces are directories located in pg_tblspc/, returned as relative paths instead of absolute paths, so rely on that to make the difference with a normal tablespace and an in-place one. If the path is relative, the tablespace is handled as a directory. If the path is absolute, consider it as a symlink. In-place tablespaces are only intended for development purposes, so like 363e8f9 no backpatch is done. A test is added in pg_rewind with an in-place tablespace and some data in it. Author: Rui Zhao, Michael Paquier Discussion: https://postgr.es/m/2b79d2a8-b2d5-4bd7-a15b-31e485100980.xiyuan.zr@alibaba-inc.com
Diffstat (limited to 'src/bin/pg_rewind/t/RewindTest.pm')
-rw-r--r--src/bin/pg_rewind/t/RewindTest.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm
index 4957791e94d..8fbbd521cb5 100644
--- a/src/bin/pg_rewind/t/RewindTest.pm
+++ b/src/bin/pg_rewind/t/RewindTest.pm
@@ -131,6 +131,7 @@ sub setup_cluster
$node_primary->append_conf(
'postgresql.conf', qq(
wal_keep_size = 320MB
+allow_in_place_tablespaces = on
));
return;
}