From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Improve handling of inherited GENERATED expressions.
Date: Thu, 12 Jan 2023 15:44:29 -0500
Message-ID: <1340662.1673556269@sss.pgh.pa.us> (raw)
In-Reply-To: <950928.1673534760@sss.pgh.pa.us>
References: <E1pFi7q-003BDS-DH@gemulon.postgresql.org>
<ff51607f-f3d7-688f-90be-4f3d16cefd40@dunslane.net>
<CA+HiwqFoaxUs2pYao7MWLh1_WpgWK_is8wcrQHT+6JDwf7jN1Q@mail.gmail.com>
<16b06d39-e36d-afa3-59d1-9c71ddfa59b7@dunslane.net>
<950928.1673534760@sss.pgh.pa.us>
I wrote:
> Yeah. I think best bet may be to drop the problematic table(s),
> as we've done for other de-supported DDL situations. A quick
> experiment suggests that
> DROP TABLE gtest_normal_child;
> DROP TABLE gtest_normal_child2;
> should do it.
Some testing here confirms that the attached patch is enough to
un-break things for HEAD. Since you mentioned you have some other
quasi-urgent BF fixes, maybe the thing to do is to roll up a release
now and then work on the bigger idea at leisure.
regards, tom lane
Attachments:fix-generated-child-tables.patch (text/x-diff, 1.2K) download
diff -pudr client-code-REL_15.orig/PGBuild/Modules/TestUpgradeXversion.pm client-code-REL_15/PGBuild/Modules/TestUpgradeXversion.pm
--- client-code-REL_15.orig/PGBuild/Modules/TestUpgradeXversion.pm 2022-12-31 09:15:03.000000000 -0500+++ client-code-REL_15/PGBuild/Modules/TestUpgradeXversion.pm 2023-01-12 15:27:30.709009163 -0500@@ -586,12 +586,17 @@ sub test_upgrade ## no critic (Subrou
}
}
- # can't upgrade aclitem in user tables from pre 16 to 16++ # stuff not supported from release 16
if ( ($this_branch gt 'REL_15_STABLE' || $this_branch eq 'HEAD')
&& ($oversion le 'REL_15_STABLE' && $oversion ne 'HEAD'))
{
- my $prstmt = "alter table if exists public.tab_core_types- drop column if exists aclitem";+ # Can't upgrade aclitem in user tables from pre 16 to 16+.+ # Also can't handle child tables with newly-generated columns.+ my $prstmt = join(';',+ 'alter table if exists public.tab_core_types+ drop column if exists aclitem',+ 'drop table if exists public.gtest_normal_child',+ 'drop table if exists public.gtest_normal_child2');
run_psql("$other_branch/inst/bin/psql", "-e", $prstmt,
"regression", "$upgrade_loc/$oversion-copy.log", 1);
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, amitlangote09@gmail.com
Subject: Re: pgsql: Improve handling of inherited GENERATED expressions.
In-Reply-To: <1340662.1673556269@sss.pgh.pa.us>
References: <E1pFi7q-003BDS-DH@gemulon.postgresql.org> <ff51607f-f3d7-688f-90be-4f3d16cefd40@dunslane.net> <CA+HiwqFoaxUs2pYao7MWLh1_WpgWK_is8wcrQHT+6JDwf7jN1Q@mail.gmail.com> <16b06d39-e36d-afa3-59d1-9c71ddfa59b7@dunslane.net> <950928.1673534760@sss.pgh.pa.us> <1340662.1673556269@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