Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlwfy-0003g0-Lu for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 15:42:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlwfx-0005R0-HY for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 15:42:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlwfx-0005QV-BK for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 15:42:01 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlwfq-0000Rz-Nj for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 15:42:00 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 1F2B45F7A5; Thu, 18 Jun 2020 11:41:53 -0400 (EDT) Date: Thu, 18 Jun 2020 11:41:53 -0400 From: Stephen Frost To: Bruce Momjian Cc: Tom Lane , Jeff Janes , Michael Paquier , ram.maurya@lavainternational.in, pgsql-bugs Subject: Re: BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match Message-ID: <20200618154152.GB6680@tamriel.snowman.net> References: <16497-38bb1f1bcec44964@postgresql.org> <20200618080509.GH118592@paquier.xyz> <1549966.1592493410@sss.pgh.pa.us> <20200618152911.GF7349@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rjejDofrVaw+idgd" Content-Disposition: inline In-Reply-To: <20200618152911.GF7349@momjian.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --rjejDofrVaw+idgd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Bruce Momjian (bruce@momjian.us) wrote: > On Thu, Jun 18, 2020 at 11:16:50AM -0400, Tom Lane wrote: > > Jeff Janes writes: > > > Since wal-segsize is changeable with pg_resetwal since v11, and pg_up= grade > > > is already calling pg_resetwal, shouldn't pg_upgrade ideally just dea= l with > > > this situation automatically by allowing the upgrade to also change t= his > > > value, rather than forcing the user to make them match manually? > >=20 > > The issue is that this is an initdb parameter, and pg_upgrade expects y= ou > > to have already initdb'd the destination cluster. We could redefine th= at, > > 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. >=20 > 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 --rjejDofrVaw+idgd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJe64tAAAoJEO1sijiDR2RVLR4QALdsf4y/ADSaM1r40nkDrRVU nLtMFyLD9mW1ttQRIQae1StZeYZY145FWfTAtgF4vFk9F/sG7lyLB42pauuG+62I T/ig0lSSlsR9Tw4pCCAC5R/oTS11aOPnaLm/HP0U+nZXHpGRw4zZRzc9nN2vmmSb fRO4M96duTR0tvy8OYKWLN/+1Qtype5lMBPmy2YcqAxOFMApMO7q/2gItqGyJrJl vw18RF9CtLTNPuGriAAqYvnwjywVFvHP7FFg3dCs7y56uhH91P0P4PFcYYzG43X/ HcD+s6aXT454iHc01c17ekZlAP619Tnwm3g1sxIZUddM3WXmMECwkUADRnrJEH2I YFGtW9MXSGkpshdYgN5Cz5rEnAQqh0v9n/v29HoX0HVTiSX49DdJN8pArqhChme8 B16daJNCultMafUUooZEkfavBX0bud1DOpmZL9juDqyvUFcUedsA3edVpMPotTzD hQNxWHjq/0NorMhz9IH0Xj4UBxz0fITBfvJ/6yfjGnCO4iT12cMEFeJSvtujGeS4 tWiPtpw7sI1YXDmY3P+wNykAypR/F/E+LJGfQWPvrzHXpxJf5GyiXYYaOZAP5tLF cVM+VoTIpp8+4jfcY8s3IfBrUmLX5XttNvDXuuVpseM3Y5a8s6aqKRhRo2hTWUOj LxAkYhAVZMqe+ucP4JHu =+ZvI -----END PGP SIGNATURE----- --rjejDofrVaw+idgd--