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 1rk8Xv-00AcFX-9W for pgsql-committers@arkaria.postgresql.org; Tue, 12 Mar 2024 20:16:23 +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 1rk8Xt-001rAh-EK for pgsql-committers@arkaria.postgresql.org; Tue, 12 Mar 2024 20:16:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rk8Xt-001rAX-7E for pgsql-committers@lists.postgresql.org; Tue, 12 Mar 2024 20:16:21 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rk8Xr-004AeX-8B for pgsql-committers@lists.postgresql.org; Tue, 12 Mar 2024 20:16:21 +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 42CKGHmM1738175; Tue, 12 Mar 2024 16:16:17 -0400 From: Tom Lane To: Jeff Davis cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Catalog changes preparing for builtin collation provider. In-reply-to: References: <8899c7c62b86370076110920686fd24863b69a01.camel@j-davis.com> <1222780.1710047108@sss.pgh.pa.us> <0ef325fa06e7a1605c4e119c4ecb637c67e5fb4e.camel@j-davis.com> <1553991.1710191312@sss.pgh.pa.us> Comments: In-reply-to Jeff Davis message dated "Mon, 11 Mar 2024 15:51:31 -0700" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <1738078.1710274545.0@sss.pgh.pa.us> Date: Tue, 12 Mar 2024 16:16:17 -0400 Message-ID: <1738174.1710274577@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1738078.1710274545.1@sss.pgh.pa.us> Jeff Davis writes: > Patch attached, following the example in AdjustUpgrade.pm. It feels a > bit inconsistent to sometimes use $oldnode->pg_version and sometimes > use $old_major_version, but it's certainly better than what I had done > in f696c0cd5f. You're still doing it the hard way. I suggest the attached. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="simpler-version-check.patch"; charset="us-ascii" Content-ID: <1738078.1710274545.2@sss.pgh.pa.us> Content-Description: simpler-version-check.patch Content-Transfer-Encoding: quoted-printable diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t= /002_pg_upgrade.pl index 5ef78691cb..34a459496e 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -92,10 +92,6 @@ my $oldnode =3D PostgreSQL::Test::Cluster->new('old_node', install_path =3D> $ENV{oldinstall}); = -# Numeric major version of old cluster, ignoring "devel" suffix. -# Needed for testing upgrades from development version to itself. -my $old_major_version =3D int($oldnode->pg_version =3D~ s/devel//rg); - my %node_params =3D (); = # To increase coverage of non-standard segment size and group access with= out @@ -118,10 +114,10 @@ my $original_locale =3D "C"; my $original_datlocale =3D ""; my $provider_field =3D "'c' AS datlocprovider"; my $old_datlocale_field =3D "NULL AS datlocale"; -if ($old_major_version >=3D 15 && $ENV{with_icu} eq 'yes') +if ($oldnode->pg_version >=3D 15 && $ENV{with_icu} eq 'yes') { $provider_field =3D "datlocprovider"; - if ($old_major_version >=3D 17) + if ($oldnode->pg_version >=3D '17devel') { $old_datlocale_field =3D "datlocale"; } ------- =_aaaaaaaaaa0--