Re: Dependencies for partitioned indexes are still a mess

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Dependencies for partitioned indexes are still a mess
Date: 2020-09-02 00:49:41
Message-ID: 20200902004941.GA18192@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-02 00:58:23 Re: Maximum password length
Previous Message Michael Paquier 2020-09-02 00:30:45 Re: Manager for commit fest 2020-09