From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Markus Bertheau" <mbertheau(dot)pg(at)googlemail(dot)com> |
Cc: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, "Peter Koczan" <pjkoczan(at)gmail(dot)com>, pgsql-performance <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: disabling an index without deleting it? |
Date: | 2008-02-27 04:48:49 |
Message-ID: | 13604.1204087729@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
"Markus Bertheau" <mbertheau(dot)pg(at)googlemail(dot)com> writes:
> 2008/2/27, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2008-02-27 05:16:54 | Re: disabling an index without deleting it? |
Previous Message | Scott Marlowe | 2008-02-27 03:48:57 | Re: disabling an index without deleting it? |