Re: Dependencies for partitioned indexes are still a mess
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2020-09-02T00:49:41Z
Lists: pgsql-hackers
On 2020-Aug-12, Alvaro Herrera wrote: > On 2020-Jul-15, Tom Lane wrote: > > (There seem to be some other problems as well, but most of the 54 complaints > > are related to partitioned indexes/constraints.) > > In my run of it there's a good dozen remaining problems, all alike: we > do DROP TYPE widget CASCADE (which works) followed by DROP FUNCTION > public.widget_out(widget), which fails complaining that type widget > doesn't exist. But in reality the error is innocuous, since that > function was dropped by the DROP TYPE CASCADE anyway. You could say > that the same thing is happening with these noisy DROP INDEX of index > partitions: the complaints are right in that each partition's DROP INDEX > command doesn't actually work, but the indexes are dropped later anyway, > so the effect is the same. I pushed the typo fix that was in this patch. Other than that, I think this patch should not be pushed; ISTM it would break the logic. (Consider that the partition with its index might exist beforehand and be an independent table. If we wanted --clean to work properly, it should definitely drop that index.) Although I'm doubtful that it makes sense to do DROP INDEX when the table is going to be dropped completely, even for regular tables. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Fix typo in comment
- fcc42756818c 12.5 landed
- 70ccff88d910 11.10 landed
- 352b8cf59f40 13.0 landed
- 05c16b827f3a 14.0 landed
-
pg_dump: fix dependencies on FKs to partitioned tables
- b7cc21c57d73 13.0 landed
- 3dadcb2b3194 12.5 landed
- 2ba5b2db7943 14.0 landed