From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_restore: Fix incompatibilities with extracted tar dumps.
Date: Mon, 23 Nov 2026 18:32:36 +0000
Message-ID: <E1xVYqB-000000003FZ-2wFR@gemulon.postgresql.org> (raw)
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 <samimseih.pg@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/av9o1Fi3PQ-jqmGO%40nathan
Backpatch-through: 15
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ffc0fbbd1d8a666ceadf8a801cc8d1d39ee086bc
Modified Files
--------------
src/bin/pg_dump/pg_backup_directory.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: nathan@postgresql.org
Subject: Re: pgsql: pg_restore: Fix incompatibilities with extracted tar dumps.
In-Reply-To: <E1xVYqB-000000003FZ-2wFR@gemulon.postgresql.org>
References: <E1xVYqB-000000003FZ-2wFR@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox