public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: In-order pg_dump (or in-order COPY TO)
Date: Tue, 26 Aug 2025 18:08:39 -0400
Message-ID: <CANzqJaAbzGqQK7b6jF-0nuvCf6_JyD7AkSHWqbY4NnP5adfeRg@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwYBVFjoNFUzsomdvRQXEEQH5A4T-+_STE=WNUomw6LZSQ@mail.gmail.com>
References: <[email protected]>
<CAKFQuwYBVFjoNFUzsomdvRQXEEQH5A4T-+_STE=WNUomw6LZSQ@mail.gmail.com>
On Tue, Aug 26, 2025 at 4:31 PM David G. Johnston <
[email protected]> wrote:
> On Tue, Aug 26, 2025 at 12:43 PM Dimitrios Apostolou <[email protected]>
> wrote:
>
>> Could the
>> row-order have changed when doing COPY FROM with pg_restore?
>
>
> There is no reliable, meaningful, row ordering when it comes to the
> physical files. Sure, cluster does make an attempt, but it is quite
> limited in practice.
>
>
>> A *logical* dump of data shouldn't be affected by on-disk order.
>> Internal representation shouldn't affect the output.
>>
>
> The logical dump has no ordering - it will come out however it comes out.
> "COPY <table> TO ..." doesn't have an order by clause - there is no way to
> make or communicate to it that ordering is important.
>
Doesn't COPY TO copy out records in the order they appeared in the physical
files? That _seems_ to mean that the records laid down by COPY FROM should
be in the same order as they were in the old dump files.
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
view thread (22+ 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]
Subject: Re: In-order pg_dump (or in-order COPY TO)
In-Reply-To: <CANzqJaAbzGqQK7b6jF-0nuvCf6_JyD7AkSHWqbY4NnP5adfeRg@mail.gmail.com>
* 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