pg_restore: Fix incompatibilities with extracted tar dumps. Extracting a tar-format archive is supposed to produce a valid directory-format archive. Each BLOBS entry in the archive's table of contents (TOC) names a file that lists the large objects to restore, but the tar format puts the wrong file name into these entries. As a result, pg_restore fails to restore large objects from an extracted tar archive, and parallel restore can't estimate their size.
To fix, construct the file name instead of using the one in the TOC entry, as commit 166b4f4560 did for directory-format archives made by versions before v12. This commit doesn't change the name recorded by the tar format, as that wouldn't help with existing archives. Reviewed-by: Sami Imseih <[email protected]> Reviewed-by: Bertrand Drouvot <[email protected]> Discussion: https://postgr.es/m/av9o1Fi3PQ-jqmGO%40nathan Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/398074af76885571c38243b383c20815564769fe Modified Files -------------- src/bin/pg_dump/pg_backup_directory.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-)
