Subject: Re: In-order pg_dump (or in-order COPY TO)

From: Tom Lane <[email-masked]>
Date: Mon, 01 Sep 2025 13:54:16 -0400

Adrian Klaver <[email-masked]> writes:
> I did some digging in the code and see that the TOC is more then that, 
> it stores a range of data. Still have not part where the offsets are 
> ignored for writes to stdout, but will keep on digging.

The TOC is initially written out with zeroes for the offsets.
Then the per-table data parts are written out, tracking where
each one begins.  At the end, if the output file is seekable,
pg_dump seeks back to the start and re-writes the whole TOC
section, now with data offsets populated.  But output to a
pipe won't be seekable.

			regards, tom lane

---

From: Adrian Klaver <[email-masked]>
Date: Mon, 1 Sep 2025 12:02:15 -0700

> section, now with data offsets populated.  But output to a

Got it, thanks.

-- 
Adrian Klaver
[email-masked]