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 1pG4R9-00043y-LE for pgsql-committers@arkaria.postgresql.org; Thu, 12 Jan 2023 20:44:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pG4R8-00041O-GS for pgsql-committers@arkaria.postgresql.org; Thu, 12 Jan 2023 20:44:34 +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 1pG4R8-000410-9T for pgsql-committers@lists.postgresql.org; Thu, 12 Jan 2023 20:44:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pG4R5-0004vc-8r for pgsql-committers@lists.postgresql.org; Thu, 12 Jan 2023 20:44:33 +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 30CKiTZ11340663; Thu, 12 Jan 2023 15:44:29 -0500 From: Tom Lane To: Andrew Dunstan cc: Amit Langote , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Improve handling of inherited GENERATED expressions. In-reply-to: <950928.1673534760@sss.pgh.pa.us> References: <16b06d39-e36d-afa3-59d1-9c71ddfa59b7@dunslane.net> <950928.1673534760@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 12 Jan 2023 09:46:00 -0500" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <1340632.1673556243.0@sss.pgh.pa.us> Date: Thu, 12 Jan 2023 15:44:29 -0500 Message-ID: <1340662.1673556269@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: <1340632.1673556243.1@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 ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="fix-generated-child-tables.patch"; charset="us-ascii" Content-ID: <1340632.1673556243.2@sss.pgh.pa.us> Content-Description: fix-generated-child-tables.patch Content-Transfer-Encoding: quoted-printable 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 1= 5: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 =3D "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 =3D 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); ------- =_aaaaaaaaaa0--