Re: [HACKERS] pg_upgrade to clusters with a different WAL segmentsize - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] pg_upgrade to clusters with a different WAL segmentsize
Date
Msg-id 20171113211142.j7r2xkvo3exfmgmn@alap3.anarazel.de
Whole thread Raw
In response to [HACKERS] pg_upgrade to clusters with a different WAL segment size  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Hi,

On 2017-11-10 15:46:11 +0000, Bossart, Nathan wrote:
> 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.

Hm. I'm not really on-board with doing this in pg_upgrade. A more
logical place seems to be pg_resetwal or something - there's no need to
force a pg_upgrade cycle (which is pretty expensive on clusters with a
significant number of objects) for somebody that wants to change the
segment size of a cluster without changing the major version.
pg_resetwal or a new tool seems like a more appropriate places for this.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] parallelize queries containing initplans
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] A GUC to prevent leader processes from running subplans?