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

From Robert Haas
Subject Re: Should I implement DROP INDEX CONCURRENTLY?
Date
Msg-id CA+Tgmobx59VkyRCyHp6EvCmccLgm3+3aGkM4+pn=LsOHd8UkSA@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?
List pgsql-hackers
On Tue, Jan 17, 2012 at 12:06 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On mån, 2012-01-16 at 14:46 -0500, Robert Haas wrote:
>> On Mon, Jan 16, 2012 at 2:06 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
>> > On mån, 2012-01-16 at 11:17 -0500, Robert Haas wrote:
>> >> I don't see how setting indisvalid to false helps with this, because
>> >> IIUC when a session sees indisvalid = false, it is supposed to avoid
>> >> using the index for queries but still make new index entries when a
>> >> write operation happens - but to drop an index, I think you'd need to
>> >> get into a state where no one was using the index for anything at all.
>> >
>> > ISTM that one would need to set indisready to false instead.
>>
>> Maybe we should set both to false?
>
> Well, ready = false and valid = true doesn't make any sense.  There is
> only just-created -> ready -> valid.  We might as well convert that to a
> single "char" column, as you had indicated in your earlier email.  But
> that's independent of the proposed patch.

Sure, but the point is that I think if you want everyone to stop
touching the index, you ought to mark it both not-valid and not-ready,
which the current patch doesn't do.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: 9.3 feature proposal: vacuumdb -j #
Next
From: Robert Haas
Date:
Subject: Re: psql \timing vs failed statements