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 1jlwTe-0003DJ-JV for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 15:29:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlwTd-00057k-H4 for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 15:29:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlwTd-00057V-BE for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 15:29:17 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlwTb-0000HL-61 for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 15:29:16 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jlwTX-0003Su-Rz; Thu, 18 Jun 2020 11:29:11 -0400 Date: Thu, 18 Jun 2020 11:29:11 -0400 From: Bruce Momjian To: Tom Lane Cc: 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: <20200618152911.GF7349@momjian.us> References: <16497-38bb1f1bcec44964@postgresql.org> <20200618080509.GH118592@paquier.xyz> <1549966.1592493410@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1549966.1592493410@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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_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'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. :-) -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee