pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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-000000003FU-2e94@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_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(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1xVYqB-000000003FU-2e94@gemulon.postgresql.org>
Permalink:  ../E1xVYqB-000000003FU-2e94@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xVYqB-000000003FU-2e94@gemulon.postgresql.org

 · 

reply

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-000000003FU-2e94@gemulon.postgresql.org>
  References: <E1xVYqB-000000003FU-2e94@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