aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_combinebackup/reconstruct.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2024-04-19 13:30:42 -0400
committerRobert Haas <rhaas@postgresql.org>2024-04-19 13:30:42 -0400
commitcd64dc42d1e1b03e57e6ba3d316e4f9dec52a78d (patch)
tree0a13f7c9e78f289f66528b83511db9ae244f1271 /src/bin/pg_combinebackup/reconstruct.c
parent6bf5c42b5546984df29289918f952e6211069c54 (diff)
downloadpostgresql-cd64dc42d1e1b03e57e6ba3d316e4f9dec52a78d.tar.gz
postgresql-cd64dc42d1e1b03e57e6ba3d316e4f9dec52a78d.zip
pg_combinebackup: Fix incorrect tablespace handling.
The previous coding mangled the pathname calculation for incremental files located in user-defined tablespaces. Enhance the test cases to cover such cases, as I should have done originally. Thanks to Andres Freund for alerting me to the lack of test coverage. Discussion: http://postgr.es/m/CA+TgmoYdXTjo9iQeoipTccDpWZzvBNS6EndY2uARM+T4yG_yDg@mail.gmail.com
Diffstat (limited to 'src/bin/pg_combinebackup/reconstruct.c')
-rw-r--r--src/bin/pg_combinebackup/reconstruct.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/pg_combinebackup/reconstruct.c b/src/bin/pg_combinebackup/reconstruct.c
index d481a5c565f..c584c63e5d5 100644
--- a/src/bin/pg_combinebackup/reconstruct.c
+++ b/src/bin/pg_combinebackup/reconstruct.c
@@ -75,9 +75,10 @@ static void read_block(rfile *s, off_t off, uint8 *buffer);
* output_filename should be the path where the reconstructed file is to be
* written.
*
- * relative_path should be the relative path to the directory containing this
- * file. bare_file_name should be the name of the file within that directory,
- * without "INCREMENTAL.".
+ * relative_path should be the path to the directory containing this file,
+ * relative to the root of the backup (NOT relative to the root of the
+ * tablespace). bare_file_name should be the name of the file within that
+ * directory, without "INCREMENTAL.".
*
* n_prior_backups is the number of prior backups, and prior_backup_dirs is
* an array of pathnames where those backups can be found.