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 1jlz0R-0000o2-98 for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 18:11:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlz0P-0005ho-Nr for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2020 18:11: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 1jlz0P-0005hh-HU for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 18:11:17 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlz0M-0001oN-Vs for pgsql-bugs@lists.postgresql.org; Thu, 18 Jun 2020 18:11:16 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A79DC5F79E; Thu, 18 Jun 2020 14:11:14 -0400 (EDT) Date: Thu, 18 Jun 2020 14:11:14 -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: <20200618181114.GG6680@tamriel.snowman.net> References: <20200618080509.GH118592@paquier.xyz> <1549966.1592493410@sss.pgh.pa.us> <20200618152911.GF7349@momjian.us> <20200618154152.GB6680@tamriel.snowman.net> <20200618154854.GG7349@momjian.us> <20200618155537.GC6680@tamriel.snowman.net> <20200618163615.GI7349@momjian.us> <20200618174241.GD6680@tamriel.snowman.net> <20200618180058.GK7349@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="e+hDQL8ScHtmKSgz" Content-Disposition: inline In-Reply-To: <20200618180058.GK7349@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 --e+hDQL8ScHtmKSgz 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 01:42:41PM -0400, Stephen Frost wrote: > > > > > Yeah, we could add a flag to pg_upgrade to > > > > > allow this if you are not upgrading replicas, but why bother? It= might > > > > > even work if you create the new replicas with the same WAL segmen= t size, > > > > > but why add complexity for pg_upgrade, which is already complex e= nough. > > > >=20 > > > > Users already have to deal with various options that need to be > > > > configured to match up between the primary and replicas, so this re= ally > > > > seems like it's entirely independent of pg_upgrade and isn't someth= ing > > > > pg_upgrade needs to be worrying about.. > > >=20 > > > Do you know why we require this step? > > >=20 > > > https://www.postgresql.org/docs/12/pgupgrade.html > > > =09 > > > Also, change wal_level to replica in the postgresql.conf file on > > > the new primary cluster. > >=20 > > Well, we'll need wal_level to be at least replica if we're going to have > > replicas streaming from the primary.. >=20 > But how do they have replicas if wal_level =3D minimum? Also, why not > higher replication levels? Should we adjust that doc text? I think the comment is saying that pg_resetwal will rewrite the pg_control with a WAL level of minimal and that's the issue and why the server needs to be brought up with a higher WAL level temporarily, so that pg_control gets updated, for the new cluster. Of course, before pg_upgrade is run, the old cluster would need to be up and running with a wal_level higher than minimal in order to have replicas in the first place, but what we're really talking about here is the new, upgraded, cluster. I do think the doc could probably say replica 'or higher'. Thanks, Stephen --e+hDQL8ScHtmKSgz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJe665CAAoJEO1sijiDR2RVh4QP/0YMfxemAO5RI7Zgr1cikP95 DzwokK152/9RcqmsOjbsCInR+6mvu4Ty4PZXQtppAjf5IWECNR2GYn9hSujQcvz0 xOfRyHvXVNGSn66qWWFkLZd0MBQDtfLbuSprwb7m8oWPzsY+k6RWFhozdH4COe2f y15qpmfNpWw9IbQiXaZHQnxet/pgUJrN1eqV4RbUIhvjCozFLm120AwGB/JHfhit 9QHwAdY/Qb1+KOCobVu61tVvuHj2300LHueAEtY50Hw6+sNHu+ReBgF255lLt2KN QiJNoYzNZ63dutcXTlCYKb9e5Nktg7pdfF/f5mq59vqGlUpjxRxhxU5zeN5q2JZO iTH5oVKSlwxsDAX7+Cpj+Urue6Kzf/Pye7ezT1sh4KOXdgMSlRtbSLdnZXPnxdlO 1TKxz2+Ul970py3Sto8itX+4l7Go7qQTpNgBz7Xuexaxb+xbpurCamXSrx0L8nGh 9ofk1c3ELMet40Ji86ya+Nk4cUsKs8wB1f0+alDGrEgvHs3ZY2NRTmdv2KXuO50L 15UDvYMXjZNzCTLFjWfZ3I/6EQW6Mx0rgcp7MOs9Q1Bby/q8yfeGRNs5zRhY7eVH KH5G41+mpv808phm1t/xfUcHieFWFgypClt5XyeZnVwU/8yNxPw7WU6kbFb5pqTC leqvU16y1wA+ju1DJKSO =iAp5 -----END PGP SIGNATURE----- --e+hDQL8ScHtmKSgz--