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

From Tom Lane
Subject Re: In-order pg_dump (or in-order COPY TO)
Date
Msg-id 1274776.1756247025@sss.pgh.pa.us
Whole thread Raw
In response to Re: In-order pg_dump (or in-order COPY TO)  (Ron Johnson <ronljohnsonjr@gmail.com>)
List pgsql-general
Ron Johnson <ronljohnsonjr@gmail.com> writes:
> On Tue, Aug 26, 2025 at 6:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'd expect pg_dump/pg_restore to preserve the physical row ordering,
>> simply because it doesn't do anything that would change that.

> But the rolling checksums are against a pg_dump file, not a pg_basebackup
> file.

Oh, that wasn't clear to me.

> What probably changed are table OIDs.  Would that change the ordering of
> COPY data in post-restore dump files?

It would not change the order of data within any one table.  There are
corner cases in which different OID assignments can cause pg_dump to
emit database objects in a different order, see this recent thread:

https://www.postgresql.org/message-id/flat/20250707192654.9e.nmisch%40google.com

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: In-order pg_dump (or in-order COPY TO)
Next
From: Adrian Klaver
Date:
Subject: Re: In-order pg_dump (or in-order COPY TO)