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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "Bossart, Nathan" <bossartn(at)amazon(dot)com>, "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 23:05:13
Message-ID: CAB7nPqToU62-SoPHhhPnBcMwvYOo1t-deWBV+uZ3Big3UaDTWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 14, 2017 at 7:32 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2017-11-14 07:26:22 +0900, Michael Paquier wrote:
>> On Tue, Nov 14, 2017 at 6:11 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> > 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.
>>
>> pg_upgrade makes use of pg_resetwal, so I am assuming that what Nathan
>> means is actually what you mean, so as pg_upgrade gains as well an
>> option with the segment size which will wrap the pg_resetwal's call.
>
> Even if that's the case, I fail to see why it'd be a good idea to have
> any sort of pg_upgrade integration here. We should make pg_resetwal's
> checks for this good enough, and not conflate something unrelated with
> pg_upgrade goals.

Both positions can be defended. Note that some users like to have the
upgrade experience within one single command do as much as possible if
possible, and this may include the possibility to switch segment size
to make the tool more friendly. I definitely agree with your point to
make the low-level magic happen in pg_resetwal though. Having
pg_upgrade call that at will could be argued afterwards.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-11-13 23:09:04 Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size
Previous Message Michael Paquier 2017-11-13 22:43:30 Re: Typo in auth-scram.c