Re: pg_dump: fail to restore partition table with serial type
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-10T23:07:52Z
Lists: pgsql-hackers
On 2019-Jun-07, Alvaro Herrera wrote: > I looked for other cases that could have been broken by changing the > partition creation methodology in pg_dump, and didn't find anything. > That part of pg_dump (dumpTableSchema) is pretty spaghettish, though; > the fact that shouldPrintColumn makes some partitioned-related decisions > and then dumpTableSchema make them again is notoriously confusing. I > could have easily missed something. There was indeed one more problem, that only the pg10 pg_upgrade test detected. Namely, binary-upgrade dump didn't restore for locally defined constraints: they were dumped twice, first in the table definition and later by the ALTER TABLE ADD CONSTRAINT bit for binary upgrade that I had failed to notice. Ooops. The reason pg10 detected it and the other branches didn't, is that the only constraint of this ilk that remained after running regress was removed by 05bd889904e0 :-( Pushed to the three branches. Hopefully it won't explode as spectacularly this time ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF (reprise)
- 6a781c4f5fec 11.4 landed
- 33a53130a894 12.0 landed
- 1eb8a5ea463d 10.9 landed
-
Revert "Make pg_dump emit ATTACH PARTITION instead of PARTITION OF"
- a1ec7402e9a0 12.0 landed
- 92880ff8a667 11.3 landed
- 40353bcc67cd 10.8 landed
-
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF
- 3b23552ad8bb 12.0 cited
-
Allow a partitioned table to have a default partition.
- 6f6b99d1335b 11.0 cited
-
Give partitioned table "p" in regression tests a less generic name.
- aa56671836e6 10.0 cited