Re: BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, ram(dot)maurya(at)lavainternational(dot)in, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match
Date: 2020-06-18 15:41:53
Message-ID: 20200618154152.GB6680@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Greetings,

* Bruce Momjian (bruce(at)momjian(dot)us) wrote:
> On Thu, Jun 18, 2020 at 11:16:50AM -0400, Tom Lane wrote:
> > Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> > > Since wal-segsize is changeable with pg_resetwal since v11, and pg_upgrade
> > > is already calling pg_resetwal, shouldn't pg_upgrade ideally just deal with
> > > this situation automatically by allowing the upgrade to also change this
> > > value, rather than forcing the user to make them match manually?
> >
> > The issue is that this is an initdb parameter, and pg_upgrade expects you
> > to have already initdb'd the destination cluster. We could redefine that,
> > perhaps, but it'd be a large change in how one uses pg_upgrade and would
> > certainly break a lot of scripts.

I don't think we really need to redefine that, what it seems we'd need
to change is to not have pg_upgrade complain about things being
different between the two which don't actually matter to pg_upgrade.

> > I'm aware that we could use pg_resetwal to deal with this one specific
> > initdb parameter, but I see no point in hacking around the problem for
> > just one parameter. The general principle remains that you need to
> > initdb the target with the same settings you used for the source.
>
> Yep, that's pretty much the issue. :-)

Well, except that for pg_upgrade to do its job correctly, the two
clusters *don't* actually need be initdb'd exactly the same way, do they?

Sure, most options to initdb need to be the same between the old cluster
and the new cluster, but this specific option doesn't have to be, since
we require that it's a cleanly shut down cluster, so why are we
complaining about it if it's different..?

Thanks,

Stephen

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2020-06-18 15:48:54 Re: BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match
Previous Message Tom Lane 2020-06-18 15:40:12 Re: BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication