Re: pg_dump is broken for partition tablespaces
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-04-23T11:03:16Z
Lists: pgsql-hackers
On Tue, 23 Apr 2019 at 18:18, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote: > > If partitions needed a > map in the old database, this patch means that they will *continue* to > need it in the new database. That's incorrect. My point was about dropped columns being removed after a dump / reload. Only binary upgrade mode preserves pg_attribute entries for dropped columns. Normal mode does not, so the maps won't be needed after the reload if they were previously only needed due to dropped columns. This is the case both with and without the pg_dump changes I proposed. The case the patch does change is if the columns were actually out of order, which I saw as an unlikely thing to happen in the real world. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, 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
-
Fix tablespace inheritance for partitioned rels
- 87259588d0ab 12.0 landed
-
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF
- a98c48debcd0 11.3 landed
- 5a191f697400 10.8 landed
- 3b23552ad8bb 12.0 landed
-
Make sure ALTER TABLE preserves index tablespaces.
- bd673e8e864a 10.0 cited