Re: optimize file transfer in pg_upgrade
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
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-19T19:32:01Z
Lists: pgsql-hackers
On Wed, Mar 19, 2025 at 12:44:38PM -0400, Andres Freund wrote: > On 2025-03-19 12:28:33 -0400, Tom Lane wrote: >> Nathan Bossart <nathandbossart@gmail.com> writes: >> > I'm currently planning to commit this sometime early-ish next week. One >> > notable loose end is the lack of a pg_upgrade test with a non-default >> > tablespace, but that is an existing problem that IMHO is best handled >> > separately (since we can only test it in cross-version upgrades). >> >> Agreed that that shouldn't block this, but we need some kind of >> plan for testing it better. > > Yea, this is really suboptimal. > > Shouldn't allow_in_place_tablespaces be sufficient to deal with that scenario? > Or at least it should make it reasonably easy to cope if it doesn't already > suffice? Unfortunately, pg_upgrade can't yet handle in-place tablespaces. One reason is that pg_tablespace_location() returns a relative path for those (e.g., "pg_tblspc/123456"). We'd also need to adjust init_tablespaces() to not fail if all the tablespaces are in-place. There may be other reasons, too. I'm confident we could get it working, but I'm not too excited about trying to sneak this into v18. In addition to testing with in-place tablespaces, we might also want to teach the transfer modes test to do cross-version testing when possible. In that case, we can test normal (non-in-place) tablespaces. However, that would be limited to the buildfarm. Does this seem like a reasonable plan for v19? -- nathan
Commits
-
initdb: Add --no-sync-data-files.
- cf131fa94285 18.0 landed
-
pg_dump: Add --sequence-data.
- 9c49f0e8cd7d 18.0 landed
-
pg_upgrade: Add --swap for faster file transfer.
- 626d7236b65d 18.0 landed
-
Add test for pg_upgrade file transfer modes.
- af0d4901c1c3 18.0 landed
-
Fix an intermetant BF failure in 003_logical_slots.
- 6f97ef05d62a 17.0 cited