Re: In-order pg_dump (or in-order COPY TO) - Mailing list pgsql-general

From Adrian Klaver
Subject Re: In-order pg_dump (or in-order COPY TO)
Date
Msg-id 46723eba-bf31-4789-bf50-9f53bc7bdc5f@aklaver.com
Whole thread Raw
In response to Re: In-order pg_dump (or in-order COPY TO)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 9/1/25 10:54, Tom Lane wrote:
> Adrian Klaver <adrian.klaver@aklaver.com> 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.

Got it, thanks.

> 
>             regards, tom lane


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: In-order pg_dump (or in-order COPY TO)
Next
From: Albrecht Dreß
Date:
Subject: Q: limit the length of log file entries?