From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Skip second WriteToc() call for custom-format dumps without data
Date: Fri, 04 Apr 2025 19:51:56 +0000
Message-ID: <E1u0n52-002gUH-2G@gemulon.postgresql.org> (raw)
Skip second WriteToc() call for custom-format dumps without data.
Presently, "pg_dump --format=custom" calls WriteToc() twice. The
second call updates the data offset information, which allegedly
makes parallel pg_restore significantly faster. However, if we're
not dumping any data, there are no data offsets to update, so we
can skip this step.
Reviewed-by: Jeff Davis <pgsql@j-davis.com>
Discussion: https://postgr.es/m/Z9c1rbzZegYQTOQE%40nathan
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e3cc039a7d930ffe86e706944a2b3368bd3ef506
Modified Files
--------------
src/bin/pg_dump/pg_backup_custom.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Skip second WriteToc() call for custom-format dumps without data
In-Reply-To: <E1u0n52-002gUH-2G@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