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 1jlvYR-00013Q-4q for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 14:30:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlvYQ-00044c-1V for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 14:30:10 +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 1jlvYP-00044V-Qu for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 14:30:09 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlvYN-0008EC-As for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 14:30:09 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jlvYJ-0006mR-HX; Thu, 18 Jun 2020 10:30:03 -0400 Date: Thu, 18 Jun 2020 10:30:03 -0400 From: Bruce Momjian 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 Message-ID: <20200618143003.GE7349@momjian.us> References: <16497-38bb1f1bcec44964@postgresql.org> <20200618080509.GH118592@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 10:18:21AM -0400, Jeff Janes wrote: > On Thu, Jun 18, 2020 at 4:05 AM Michael Paquier wrote: > > On Wed, Jun 17, 2020 at 09:00:23PM +0000, PG Bug reporting form wrote: > > I am facing error during upgrade from postgresql -11 to 12. > > can you please suggest what is solution. > > As the error message is telling, you need to make the WAL segment > sizes of the old and new clusters match.  This can be defined at > server initialization time using initdb with a default of 16MB, so > that's not a bug from us, but something you need to take care of > within your upgrade process. > > > 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? Uh, well, pg_upgrade is very conservative and fails if anything looks odd, like different WAL sizes. Since pg_upgrade doesn't even copy the WAL from the old server, I am not sure why we require the WAL segment size to match, but it might be so we can run pg_upgrade on replicas. The bottom line is that pg_upgrade is complex enough, and having it try to do more is not a wise approach. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee