Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7ULP-005tNv-EP for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2024 06:12:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s7ULO-000JRT-UN for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2024 06:11:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7ULO-000JRL-DZ for pgsql-hackers@lists.postgresql.org; Thu, 16 May 2024 06:11:58 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7ULK-000S4s-41 for pgsql-hackers@postgresql.org; Thu, 16 May 2024 06:11:57 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 706FC301A1E4 for ; Thu, 16 May 2024 08:11:50 +0200 (CEST) Received: from s981.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 5E9322E27E89; Thu, 16 May 2024 08:11:50 +0200 (CEST) Received: from s472.loopia.se (unknown [172.22.191.6]) by s981.loopia.se (Postfix) with ESMTP id 5976422B17D2; Thu, 16 May 2024 08:11:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s472.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s980.loopia.se ([172.22.191.5]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with LMTP id vZGqrjTJSl27; Thu, 16 May 2024 08:11:49 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 185.224.57.161 Received: from smtpclient.apple (unknown [185.224.57.161]) (Authenticated sender: daniel@yesql.se) by s980.loopia.se (Postfix) with ESMTPSA id 2C5BB2201628; Thu, 16 May 2024 08:11:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1715839909; bh=uIUTBLFGsBc5/FpRJoryTwSWj0QA9VSbC67DAB7R8qw=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=li3jjkpdZiG3vwgvqBCmjNJDQ2pPbRbpvvlRh14Pal3tOdogONMXhGrLbd1GIgFlT 9P3AtiLJeuf1DCG5QivyIGgb7M9YHD4buCi+S5+Eujye4LIMg3BoHOsTVca0/glUC6 d9Mia2Rnxjr5GHlq924RN+dS2iFTTuCZBpbynf7nR6Sqwx2fYdz375h6LMV3I2jcLK gEJn2/a5J8y1xvJeqbQRJCpGOYHqerrkImntJKxNCzwBzdh+BIeWS9Td266MBKokB9 NPqayoT9GycK0wYYfS4plk798R116Dig0xFE4lTWhb0e3ehqgWv4JjhJ/T3bpYTqHB dHgVrUpRJCc6g== From: Daniel Gustafsson Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_8E1F4B01-26B5-4AA5-91D7-740295A9FDB8" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: [UNVERIFIED SENDER] pg_upgrade can result in early wraparound on databases with high transaction load Date: Thu, 16 May 2024 08:11:37 +0200 In-Reply-To: <1973418.1657040382@sss.pgh.pa.us> Cc: Bruce Momjian , "Drouvot, Bertrand" , Andres Freund , Justin Pryzby , Noah Misch , Jason Harvey , Peter Geoghegan , PostgreSQL Hackers , "Tharakan, Robins" To: Tom Lane References: <20190615183759.GB239428@rfd.leadboat.com> <20210423234256.hwopuftipdmp3okf@alap3.anarazel.de> <20210424002827.GO7256@telsasoft.com> <20210424010005.fttcfskp3unr4jiu@alap3.anarazel.de> <78bf65ea-517a-51ed-947b-9728a6ace513@amazon.com> <20210727023904.GA19774@momjian.us> <1973418.1657040382@sss.pgh.pa.us> X-Mailer: Apple Mail (2.3774.500.171.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_8E1F4B01-26B5-4AA5-91D7-740295A9FDB8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 5 Jul 2022, at 18:59, Tom Lane wrote: > Given the lack of field complaints, it's probably not worth trying > to do anything to restore that capability. But we really ought to > update pg_upgrade's code and docs in pre-v15 branches to say that > the minimum supported source version is 9.0. (reviving an old thread from the TODO) Since we never got around to doing this we still refer to 8.4 as a = possible upgrade path in v14 and older. There seems to be two alternatives here, either we bump the minimum = version in v14-v12 to 9.0 which is the technical limitation brought by 695b4a113ab, = or we follow the direction taken by e469f0aaf3c and set 9.2. e469f0aaf3c = raised the minimum supported version to 9.2 based on the complexity of compiling = anything older using a modern toolchain. It can be argued that making a change we don't cover with testing is = unwise, but we clearly don't test the current code either since it's broken. The attached takes the conservative approach of raising the minimum = supported version to 9.0 while leaving the code to handle 8.4 in place. While it = can be removed, the risk/reward tradeoff of gutting code in backbranches = doesn't seem appealing since the code will be unreachable with this check anyways. Thoughts? -- Daniel Gustafsson --Apple-Mail=_8E1F4B01-26B5-4AA5-91D7-740295A9FDB8 Content-Disposition: attachment; filename=0001-Refuse-upgrades-from-pre-9.0-clusters.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Refuse-upgrades-from-pre-9.0-clusters.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d0b747eb43980e4e639fd3844357e0ccbffbd705=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Daniel=20Gustafsson=20= =0ADate:=20Thu,=2016=20May=202024=2007:43:50=20= +0200=0ASubject:=20[PATCH]=20Refuse=20upgrades=20from=20pre-9.0=20= clusters=0A=0ACommit=20695b4a113ab=20added=20a=20dependency=20on=20= retrieving=20oldestxid=20from=0Apg_control,=20which=20only=20exists=20in=20= 9.0=20and=20onwards,=20but=20the=20check=20for=0A8.4=20as=20the=20oldest=20= version=20was=20retained.=20Since=20there=20has=20been=20few=20if=0Aany=20= complaints=20of=208.4=20upgrades=20not=20working,=20fix=20by=20setting=20= 9.0=20as=0Athe=20oldest=20version=20supported=20rather=20than=20= resurrecting=208.4=20support.=0A=0ABackpatch=20to=20all=20supported=20= versions.=0A=0ADiscussion:=20= https://postgr.es/m/1973418.1657040382@sss.pgh.pa.us=0A= Backpatch-through:=20v12=0A---=0A=20doc/src/sgml/ref/pgupgrade.sgml=20|=20= 2=20+-=0A=20src/bin/pg_upgrade/check.c=20=20=20=20=20=20|=209=20= +++++++--=0A=202=20files=20changed,=208=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20a/doc/src/sgml/ref/pgupgrade.sgml=20= b/doc/src/sgml/ref/pgupgrade.sgml=0Aindex=20d401053edf..8add90e8ed=20= 100644=0A---=20a/doc/src/sgml/ref/pgupgrade.sgml=0A+++=20= b/doc/src/sgml/ref/pgupgrade.sgml=0A@@=20-67,7=20+67,7=20@@=20PostgreSQL=20= documentation=0A=20=20=0A=20=0A=20=20=20=0A-=20=20=20= pg_upgrade=20supports=20upgrades=20from=208.4.X=20and=20later=20to=20the=20= current=0A+=20=20=20pg_upgrade=20supports=20upgrades=20from=209.0.X=20= and=20later=20to=20the=20current=0A=20=20=20=20major=20release=20of=20= PostgreSQL,=20including=20snapshot=20and=20= beta=20releases.=0A=20=20=20=0A=20=20=0Adiff=20--git=20= a/src/bin/pg_upgrade/check.c=20b/src/bin/pg_upgrade/check.c=0Aindex=20= dc060418e5..05a94087c5=20100644=0A---=20a/src/bin/pg_upgrade/check.c=0A= +++=20b/src/bin/pg_upgrade/check.c=0A@@=20-316,8=20+316,13=20@@=20= check_cluster_versions(void)=0A=20=09=20*=20upgrades=0A=20=09=20*/=0A=20=0A= -=09if=20(GET_MAJOR_VERSION(old_cluster.major_version)=20<=20804)=0A-=09=09= pg_fatal("This=20utility=20can=20only=20upgrade=20from=20PostgreSQL=20= version=208.4=20and=20later.\n");=0A+=09/*=0A+=09=20*=20The=20minimum=20= version=20supported=20then=20this=20code=20shipped=20in=20a=20major=20= version=0A+=09=20*=20was=208.4.=20This=20has=20since=20been=20raised=20= to=209.0,=20but=20the=20support=20code=20for=0A+=09=20*=20dealing=20with=20= 8.4=20remains=20to=20avoid=20refactoring=20in=20a=20backbranch.=0A+=09=20= */=0A+=09if=20(GET_MAJOR_VERSION(old_cluster.major_version)=20<=20900)=0A= +=09=09pg_fatal("This=20utility=20can=20only=20upgrade=20from=20= PostgreSQL=20version=209.0=20and=20later.\n");=0A=20=0A=20=09/*=20Only=20= current=20PG=20version=20is=20supported=20as=20a=20target=20*/=0A=20=09= if=20(GET_MAJOR_VERSION(new_cluster.major_version)=20!=3D=20= GET_MAJOR_VERSION(PG_VERSION_NUM))=0A--=20=0A2.39.3=20(Apple=20Git-146)=0A= =0A= --Apple-Mail=_8E1F4B01-26B5-4AA5-91D7-740295A9FDB8--