Re: disabling an index without deleting it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Markus Bertheau" <mbertheau.pg@xxxxxxxxxxxxxx> writes:
> 2008/2/27, Tom Lane <tgl@xxxxxxxxxxxxx>:
>> 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux