1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

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
This commit is contained in:
Robert Haas
2024-04-19 13:30:42 -04:00
parent 6bf5c42b55
commit cd64dc42d1
3 changed files with 33 additions and 8 deletions

View File

@ -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.