From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Catalog changes preparing for builtin collation provider.
Date: Tue, 12 Mar 2024 16:16:17 -0400
Message-ID: <1738174.1710274577@sss.pgh.pa.us> (raw)
In-Reply-To: <a4e4e1432c1c403318774f4b0c9b25a33e44e7fa.camel@j-davis.com>
References: <E1rj5WA-002z5V-WA@gemulon.postgresql.org>
<8899c7c62b86370076110920686fd24863b69a01.camel@j-davis.com>
<1222780.1710047108@sss.pgh.pa.us>
<0ef325fa06e7a1605c4e119c4ecb637c67e5fb4e.camel@j-davis.com>
<1553991.1710191312@sss.pgh.pa.us>
<a4e4e1432c1c403318774f4b0c9b25a33e44e7fa.camel@j-davis.com>
Jeff Davis <pgsql@j-davis.com> 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
Attachments:simpler-version-check.patch (text/x-diff, 1.1K) downloaddiff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.plindex 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 =
PostgreSQL::Test::Cluster->new('old_node',
install_path => $ENV{oldinstall});
-# Numeric major version of old cluster, ignoring "devel" suffix.-# Needed for testing upgrades from development version to itself.-my $old_major_version = int($oldnode->pg_version =~ s/devel//rg);-
my %node_params = ();
# To increase coverage of non-standard segment size and group access without
@@ -118,10 +114,10 @@ my $original_locale = "C";
my $original_datlocale = "";
my $provider_field = "'c' AS datlocprovider";
my $old_datlocale_field = "NULL AS datlocale";
-if ($old_major_version >= 15 && $ENV{with_icu} eq 'yes')+if ($oldnode->pg_version >= 15 && $ENV{with_icu} eq 'yes')
{
$provider_field = "datlocprovider";
- if ($old_major_version >= 17)+ if ($oldnode->pg_version >= '17devel')
{
$old_datlocale_field = "datlocale";
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql@j-davis.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Catalog changes preparing for builtin collation provider.
In-Reply-To: <1738174.1710274577@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox