Re: disabling an index without deleting it? - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: disabling an index without deleting it?
Date
Msg-id dcc563d10802262116q54b0541fj1aa10821e2255419@mail.gmail.com
Whole thread Raw
In response to Re: disabling an index without deleting it?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: disabling an index without deleting it?
List pgsql-performance
On Tue, Feb 26, 2008 at 10:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Markus Bertheau" <mbertheau.pg@googlemail.com> writes:
>  > 2008/2/27, Tom Lane <tgl@sss.pgh.pa.us>:
>
> >> No, what makes you think that?  The index won't change at all in the
>  >> above example.  The major problem is, as Scott says, that DROP INDEX
>  >> takes exclusive lock on the table so any other sessions will be locked
>  >> out of it for the duration of your test query.
>
>  > Why is the exclusive lock not taken later, so that this method can be
>  > used reasonably risk-free on production systems?
>
>  Er, later than what?  Once the DROP is pending, other transactions can
>  hardly safely use the index for lookups, and what should they do about
>  insertions?

I see what you're saying.  Sadly, my dreams of drop index concurrently
appear dashed.

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: disabling an index without deleting it?
Next
From: Tom Lane
Date:
Subject: Re: disabling an index without deleting it?