pg_upgrade to clusters with a different WAL segment size
Nathan Bossart <bossartn@amazon.com>
From: "Bossart, Nathan" <bossartn@amazon.com>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-11-10T15:46:11Z
Lists: pgsql-hackers
Hi hackers, The thread for the recent change to allow setting the WAL segment size at initdb time [0] included a bit of discussion regarding pg_upgrade [1], where it was suggested that relaxing an error check (presumably in check_control_data()) might be enough to upgrade servers to a different WAL segment size. We've had success with our initial testing of upgrades to larger WAL segment sizes, including post-upgrade pgbench runs. Beyond adjusting check_control_data(), it looks like the 'pg_resetwal -l' call in copy_xact_xlog_xid() may need to be adjusted to ensure that the WAL starting address is set to a valid value. Allowing changes to the WAL segment size during pg_upgrade seems like a nice way to avoid needing a dump and load, so I would like to propose adding support for this. I'd be happy to submit patches for this in the next commitfest. Nathan [0] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=fc49e24fa69a15efacd5b8958115ed9c43c48f9a [1] https://www.postgresql.org/message-id/20160826043926.pwkz45ksxpmfn4g6%40alap3.anarazel.de
Commits
-
pg_resetwal: Prevent division-by-zero errors
- f1a074b146c9 11.0 landed
-
Make WAL segment size configurable at initdb time.
- fc49e24fa69a 11.0 cited