Re: Bugs in CREATE/DROP INDEX CONCURRENTLY - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Bugs in CREATE/DROP INDEX CONCURRENTLY
Date
Msg-id 20121017205238.155620@gmx.com
Whole thread Raw
In response to Bugs in CREATE/DROP INDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Simon Riggs wrote:
> On 6 October 2012 00:56, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 2. DROP INDEX CONCURRENTLY doesn't bother to do
>> TransferPredicateLocksToHeapRelation until long after it's
>> invalidated the index. Surely that's no good? Is it even possible
>> to do that correctly, when we don't have a lock that will prevent
>> new predicate locks from being taken out meanwhile?
> 
> No idea there. Input appreciated.

[Sorry for delayed response; fighting through a backlog.]
If the creation of a new tuple by insert or update would not perform
the related index tuple insertion, and the lock has not yet been
transfered to the heap relation, yes we have a problem.  Will take a
look at the code.

Creation of new predicate locks while in this state has no bearing on
the issue as long as locks are transferred to the heap relation after
the last scan using the index has completed.

-Kevin



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Bugs in planner's equivalence-class processing