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 1jlwHl-0002qS-N6 for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 15:17:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlwHk-00007E-Ek for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 15:17:00 +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 1jlwHk-000077-8f for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 15:17:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlwHi-00009e-A6 for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 15:16:59 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 05IFGoK61549967; Thu, 18 Jun 2020 11:16:50 -0400 From: Tom Lane To: Jeff Janes cc: 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 In-reply-to: References: <16497-38bb1f1bcec44964@postgresql.org> <20200618080509.GH118592@paquier.xyz> Comments: In-reply-to Jeff Janes message dated "Thu, 18 Jun 2020 10:18:21 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1549965.1592493410.1@sss.pgh.pa.us> Date: Thu, 18 Jun 2020 11:16:50 -0400 Message-ID: <1549966.1592493410@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. regards, tom lane