Re: pg_restore - generated column - not populating
Santosh Udupi <email@hitha.net>
From: Santosh Udupi <email@hitha.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Adrian Klaver <adrian.klaver@aklaver.com>, pgsql-bugs@lists.postgresql.org
Date: 2021-02-24T02:18:06Z
Lists: pgsql-bugs, pgsql-general
Hi Tom, To add to your finding: we compared between the postgresql pg_dump and the pgAdmin (win) pg_dump. The main table definition remains the same but the partition table versions differ [image: image.png] [image: image.png] On Tue, Feb 23, 2021 at 5:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > [ redirecting to pgsql-bugs ] > > Santosh Udupi <email@hitha.net> writes: > > Here is my table structure. > > Indeed, this looks pretty busted, both in v13 and HEAD. It seems that > pg_dump is not coping well with GENERATED columns attached to a > partition parent table. I made the attached script with a bit of > sample data, loaded it into an empty database, and dumped it. > The dump is evidently assuming that ALTER TABLE ATTACH PARTITION > is going to cause the generated-ness of the columns to propagate > to the children, but it doesn't. There also seems to be considerable > confusion about which columns of the child tables should be included > in the dumped data. > > I suspect this example is revealing bugs in both the backend > (ATTACH PARTITION ought to take care of this, no?) and pg_dump > (the backend can't be blamed for pg_dump's choices of columns > to dump). Peter? > > regards, tom lane > >
Commits
-
pg_dump: Fix dump of generated columns in partitions
- bdaa0d2d7269 12.7 landed
- a6a3a274abd1 13.3 landed
- feb270d1005f 14.0 landed