Re: optimize file transfer in pg_upgrade

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Greg Sabino Mullane <htamfids@gmail.com>, pgsql-hackers@postgresql.org, bruce@momjian.us
Date: 2025-03-18T17:37:02Z
Lists: pgsql-hackers
Hi,

On 2025-03-18 12:29:02 -0500, Nathan Bossart wrote:
> Here is a first sketch at a test that cycles through all the transfer modes
> and makes sure they succeed or fail with an error along the lines of "not
> supported on this platform."  Each test verifies that some very simple
> objects make it to the new version, which we could of course expand on.
> Would something like this suffice?

I'd add a few more complications:

- Create and test a relation that was rewritten, to ensure we test the
  relfilenode != oid case and one that isn't rewritten.

- Perhaps create a tablespace?

- Do we need a new old cluster for each of the modes? That seems like wasted
  time?  I guess it's required for --link...


Greetings,

Andres Freund



Commits

  1. initdb: Add --no-sync-data-files.

  2. pg_dump: Add --sequence-data.

  3. pg_upgrade: Add --swap for faster file transfer.

  4. Add test for pg_upgrade file transfer modes.

  5. Fix an intermetant BF failure in 003_logical_slots.