Re: BUG #16594: DROP INDEX CONCURRENTLY fails on partitioned table with a non helpful error message.

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: jan(dot)mussler(at)zalando(dot)de, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16594: DROP INDEX CONCURRENTLY fails on partitioned table with a non helpful error message.
Date: 2020-08-27 19:22:18
Message-ID: 20200827192218.GA5787@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2020-Aug-27, Alvaro Herrera wrote:

> On 2020-Aug-27, Michael Paquier wrote:
>
> > The error message is really confusing though, so for now I would
> > recommend to just drop an error if trying the operation on a
> > partitioned table, and we also do that now for CREATE INDEX
> > CONCURRENTLY.
>
> Yeah, let's throw an error if the table is partitioned. My bug -- I'll
> go fix it now.

... as attached.

I first tried to add a hack directly in index_drop, but that doesn't
really work because there's no way to tell whether the partitioned index
is going to be dropped first or the index partition -- as that code runs
after the dependency tree has been walked. The condition has to be
checked before starting the object-drop code proper.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Raise-error-on-concurrent-drop-of-partitioned-index.patch text/x-diff 2.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jan Mußler 2020-08-27 19:51:10 Re: BUG #16594: DROP INDEX CONCURRENTLY fails on partitioned table with a non helpful error message.
Previous Message PG Bug reporting form 2020-08-27 18:07:21 BUG #16598: SharedFileSetCreate doesn't handle PathNameCreateTemporaryFile failure correctly