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

From Tom Lane
Subject Re: disabling an index without deleting it?
Date
Msg-id 13604.1204087729@sss.pgh.pa.us
Whole thread Raw
In response to Re: disabling an index without deleting it?  ("Markus Bertheau" <mbertheau.pg@googlemail.com>)
Responses Re: disabling an index without deleting it?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: disabling an index without deleting it?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-performance
"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?

            regards, tom lane

pgsql-performance by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: disabling an index without deleting it?
Next
From: "Scott Marlowe"
Date:
Subject: Re: disabling an index without deleting it?