Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size

From: Andres Freund <andres(at)anarazel(dot)de>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size
Date: 2017-11-13 21:11:42
Message-ID: 20171113211142.j7r2xkvo3exfmgmn@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-11-13 21:30:56 Re: [HACKERS] A GUC to prevent leader processes from running subplans?
Previous Message Robert Haas 2017-11-13 21:09:40 Re: [HACKERS] parallelize queries containing initplans