public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: Corey Huinker <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: Robert Treat <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: jian he <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: Magnus Hagander <[email protected]>
Cc: Stephen Frost <[email protected]>
Cc: Ashutosh Bapat <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: [email protected]
Subject: Re: Statistics Import and Export
Date: Mon, 17 Mar 2025 20:01:48 -0500
Message-ID: <Z9jF_D472ec1itOu@nathan> (raw)
In-Reply-To: <CADkLM=fTpGp+19=fTqb3tbZ=A2Gpw4+CbURT=T5wQBmebq9gjA@mail.gmail.com>
References: <[email protected]>
	<CABV9wwP_ajEbLhCzfCO2Sy0180AshYwQFViys=QhyZA7sW2_qw@mail.gmail.com>
	<CADkLM=dvG_F2giHEAGJ=DGVGNmujUt0vAaXNSDkDXzbzcGQbxQ@mail.gmail.com>
	<CAJSLCQ10++5GLeoRwNMQMKuaVrikEp2X6feBv=kYDtWmsVy-Pw@mail.gmail.com>
	<[email protected]>
	<CADkLM=c+r05srPy9w+-+nbmLEo15dKXYQ03Q_xyK+riJerigLQ@mail.gmail.com>
	<Z9c1rbzZegYQTOQE@nathan>
	<CADkLM=djvsMewpPw1K4WcgWCnaHZYmYyqic9yc_mXjsdwb+Dzg@mail.gmail.com>
	<Z9gwfFP-eTx-MTqr@nathan>
	<CADkLM=fTpGp+19=fTqb3tbZ=A2Gpw4+CbURT=T5wQBmebq9gjA@mail.gmail.com>

On Mon, Mar 17, 2025 at 07:24:46PM -0400, Corey Huinker wrote:
> On Mon, Mar 17, 2025 at 10:24 AM Nathan Bossart <[email protected]>
> wrote:
>> I'm assuming that writing a completely different TOC on the second pass
>> would corrupt the dump file.  Perhaps we could teach it to skip stats
>> entries on the second pass or something, but I'm not too wild about adding
>> to the list of invasive changes we're making last-minute for v18.
> 
> I'm confused, are they needed in both places?

AFAICT yes.  The second pass rewrites the TOC to udpate the data offset
information.  If we wrote a different TOC the second time around, then the
dump file would be broken, right?

		/*
		 * If possible, re-write the TOC in order to update the data offset
		 * information.  This is not essential, as pg_restore can cope in most
		 * cases without it; but it can make pg_restore significantly faster
		 * in some situations (especially parallel restore).
		 */
		if (ctx->hasSeek &&
			fseeko(AH->FH, tpos, SEEK_SET) == 0)
			WriteToc(AH);

-- 
nathan





view thread (204+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Statistics Import and Export
  In-Reply-To: <Z9jF_D472ec1itOu@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox