From: | "Kevin Grittner" <kgrittn(at)mail(dot)com> |
---|---|
To: | "Andres Freund" <andres(at)2ndquadrant(dot)com>,pgsql-hackers(at)postgresql(dot)org |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"Simon Riggs" <simon(at)2ndquadrant(dot)com> |
Subject: | Re: Bugs in CREATE/DROP INDEX CONCURRENTLY |
Date: | 2012-10-18 12:58:43 |
Message-ID: | 20121018125843.224550@gmx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund wrote:
> On Thursday, October 18, 2012 06:12:02 AM Kevin Grittner wrote:
>> I'm having trouble seeing a way to make this work without
>> rearranging the code for concurrent drop to get to a state where
>> it has set indisvalid = false, made that visible to all processes,
>> and ensured that all scans of the index are complete -- while
>> indisready is still true. That is the point where
>> TransferPredicateLocksToHeapRelation() could be safely called.
>> Then we would need to set indisready = false, make that visible to
>> all processes, and ensure that all access to the index is
>> complete. I can't see where it works to set both flags at the same
>> time.
> In a nearby bug I had to restructure the code that in a way thats
> similar to this anyway, so that seems fine. Maybe you can fix the
> bug ontop of the two attached patches?
Perfect; these two patches provide a spot in the code which is
exactly right for handling the predicate lock adjustments. Attached
is a patch which applies on top of the two you sent.
Thanks!
-Kevin
Attachment | Content-Type | Size |
---|---|---|
drop-index-concurrently-predicate-locks-v3.patch | text/x-patch | 2.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2012-10-18 13:35:42 | Re: Deprecations in authentication |
Previous Message | Simon Riggs | 2012-10-18 12:19:26 | Re: Re: DROP INDEX CONCURRENTLY is not really concurrency safe & leaves around undroppable indexes |