From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: reindex creates predicate lock on index root |
Date: | 2011-06-08 15:36:57 |
Message-ID: | 4DEF50C9020000250003E2FF@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2011-06-08 15:39:06 | Re: reducing the overhead of frequent table locks - now, with WIP patch |
Previous Message | Alvaro Herrera | 2011-06-08 15:33:50 | Re: SSI heap_insert and page-level predicate locks |