RE: unsubscribe - Mailing list pgsql-hackers

From Ian Corson
Subject RE: unsubscribe
Date
Msg-id 00ab01d36009$334af940$99e0ebc0$@gmail.com
Whole thread Raw
In response to unsubscribe  ("Stevenson, Bob" <BobStevenson@officemax.com>)
List pgsql-hackers

-----Original Message-----
From: Jeremy Schneider [mailto:schneider@ardentperf.com]
Sent: Friday, November 17, 2017 5:47 PM
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael.paquier@gmail.com>; Andres Freund <andres@anarazel.de>; Bossart, Nathan
<bossartn@amazon.com>;pgsql-hackers@postgresql.org 
Subject: Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size

On Mon, Nov 13, 2017 at 3:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> On Tue, Nov 14, 2017 at 7:32 AM, Andres Freund <andres@anarazel.de> wrote:
>>> 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.
>
> FWIW, I agree with Andres' position here.  I think the charter of
> pg_upgrade is to duplicate the old cluster as closely as it can, not
> to modify its configuration.  A close analogy is that it does not
> attempt to upgrade extension versions while migrating the cluster.

Having pg_upgrade simply allow an upgrade where the WAL sizes don't match between the old cluster and the new cluster
seemsfairly trivial. 
pg_upgrade isn't
changing anything; it's just *not* requiring the new and old clusters to match in this way. I'll admit I'm much newer
topostgresql than everyone else on this list, but I haven't yet thought of any technical reason this check is actually
needed.(Just the WAL sequencing/naming concern I outlined earlier.) 

Writing code to change the WAL size on an existing cluster will be a little more complex.  We will need to delete all
WALfiles and recreate them at the new sizes. We will need to either (1) be absolutely sure that there was a clean
shutdownor (2) copy WAL data from the old files to the new files.  We will need to think harder through the issue of
gapsbeing introduced in the sequence of WAL filenames and effects on backup/recovery. 

These two ideas don't seem mutually exclusive to me.  If pg_upgrade allows working with different WAL sizes, it doesn't
meanwe can't still introduce a utility to change the WAL size on running clusters. 

So yeah - having a utility command to change the WAL size on a running cluster is a great idea.  But why are we wanting
tomaintain a check in pg_upgrade which doesn't actually seem technically necessary?  Or am I missing something that
wouldbreak if the WAL sizes didn't match across two clusters when pg_upgrade moved the data between them? 

-Jeremy

--
http://about.me/jeremy_schneider

(Disclaimer: I work for AWS and my opinions are my own.)



pgsql-hackers by date:

Previous
From: Sophie Herold
Date:
Subject: to_typemod(type_name) information function
Next
From: Peter Geoghegan
Date:
Subject: Re: Treating work_mem as a shared resource (Was: Parallel Hash take II)