aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/libpq_source.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_rewind/libpq_source.c')
-rw-r--r--src/bin/pg_rewind/libpq_source.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bin/pg_rewind/libpq_source.c b/src/bin/pg_rewind/libpq_source.c
index 0d8e9ee2d1a..417c74cfefc 100644
--- a/src/bin/pg_rewind/libpq_source.c
+++ b/src/bin/pg_rewind/libpq_source.c
@@ -298,7 +298,16 @@ libpq_traverse_files(rewind_source *source, process_file_callback_t callback)
link_target = PQgetvalue(res, i, 3);
if (link_target[0])
- type = FILE_TYPE_SYMLINK;
+ {
+ /*
+ * In-place tablespaces are directories located in pg_tblspc/ with
+ * relative paths.
+ */
+ if (is_absolute_path(link_target))
+ type = FILE_TYPE_SYMLINK;
+ else
+ type = FILE_TYPE_DIRECTORY;
+ }
else if (isdir)
type = FILE_TYPE_DIRECTORY;
else