Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icVQC-0007Tq-Dv for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Dec 2019 14:14:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icVQB-0001Hm-1J for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Dec 2019 14:14:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icVQA-0001Hf-Oh for pgsql-hackers@lists.postgresql.org; Wed, 04 Dec 2019 14:14:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icVQ4-00081Z-8z for pgsql-hackers@lists.postgresql.org; Wed, 04 Dec 2019 14:14:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xB4EE83m015831; Wed, 4 Dec 2019 09:14:09 -0500 From: Tom Lane To: pgsql-hackers@lists.postgresql.org cc: Peter Eisentraut Subject: Dumping/restoring fails on inherited generated column MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15829.1575468847.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 04 Dec 2019 09:14:07 -0500 Message-ID: <15830.1575468847@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Run the regression tests with "make installcheck", then: $ pg_dump -Fc regression >r.dump $ createdb r2 $ pg_restore -d r2 r.dump pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 6005; 2604 24821 DEFAULT gtest1_1 b postgres pg_restore: error: could not execute query: ERROR: column "b" of relation= "gtest1_1" is a generated column Command was: ALTER TABLE ONLY public.gtest1_1 ALTER COLUMN b SET DEFAULT (= a * 2); pg_restore: warning: errors ignored on restore: 1 $ = It looks like gtest1_1 inherits column "b" from gtest1, so possibly pg_dump is just confused about the combination of inheritance and generated columns. I see this in v12 as well as HEAD. One interesting question is how come the pg_upgrade test isn't failing --- maybe binary-upgrade mode handles this case differently? regards, tom lane