Re: Should I implement DROP INDEX CONCURRENTLY? - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Should I implement DROP INDEX CONCURRENTLY?
Date
Msg-id CA+U5nMLQjFQvgyDVZ7wH7EcGM7bZRoLngJSp7aOFXko0-7Ab9g@mail.gmail.com
Whole thread Raw
In response to Re: Should I implement DROP INDEX CONCURRENTLY?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Should I implement DROP INDEX CONCURRENTLY?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Dec 30, 2011 at 10:20 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On ons, 2011-08-24 at 11:24 -0700, Daniel Farina wrote:
>> I was poking around at tablecmds and index.c and wonder if a similar
>> two-pass approach as used by CREATE INDEX CONCURRENTLY can be used to
>> create a DROP INDEX CONCURRENTLY, and if there would be any interest
>> in accepting such a patch.
>
> Hmm, it seems I just independently came up with this same concept.  My
> problem is that if a CREATE INDEX CONCURRENTLY fails, you need an
> exclusive lock on the table just to clean that up.  If the table is
> under constant load, you can't easily do that.  So a two-pass DROP INDEX
> CONCURRENTLY might have been helpful for me.

Here's a patch for this. Please review.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Should I implement DROP INDEX CONCURRENTLY?
Next
From: Andrew Dunstan
Date:
Subject: alternate psql file locations