Re: reindex creates predicate lock on index root - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: reindex creates predicate lock on index root
Date
Msg-id 4DEF50C9020000250003E2FF@gw.wicourts.gov
Whole thread Raw
In response to Re: reindex creates predicate lock on index root  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: reindex creates predicate lock on index root
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
>>  The attached patch has not yet been tested, but I'll test it
>> today along with the latest committed code.
> 
> You can't use GetActiveSnapshot() for this.
Yeah, it didn't take much testing to find that out.  I had a naive
assumption that the GetActiveSnapshot would return whatever snapshot
was in use at the point of the call.
> You can have one snapshot pushed to the active snapshot stack, and
> do a DDL operation like reindex using a different snapshot. You'll
> have to check the snapshot in the HeapScanDesc.
Will look at that.  Do you think it makes more sense to pass in the
snapshot on all these calls and test it within predicate.c, or
condition the calls on this?
-Kevin


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: SSI heap_insert and page-level predicate locks
Next
From: Jim Nasby
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch