Skip site navigation (1) Skip section navigation (2)


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Daniel Farina <daniel(at)heroku(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should I implement DROP INDEX CONCURRENTLY?
Date: 2012-01-18 22:49:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, Jan 18, 2012 at 1:28 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Jan 17, 2012 at 12:06 PM, Peter Eisentraut <peter_e(at)gmx(dot)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(at)gmx(dot)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.

Thanks for the review and the important observation. I agree that I've
changed the wrong column. indisready must be set false. Also agree
setting both false makes most sense.

Can I just check with you that the only review comment is a one line
change? Seems better to make any additional review comments in one go.

 Simon Riggs         
 PostgreSQL Development, 24x7 Support, Training & Services

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2012-01-18 23:12:40
Subject: Re: Should I implement DROP INDEX CONCURRENTLY?
Previous:From: Simon RiggsDate: 2012-01-18 22:38:30
Subject: Re: Group commit, revised

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group