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 4DEEA822020000250003E2C9@gw.wicourts.gov
Whole thread Raw
In response to reindex creates predicate lock on index root  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: reindex creates predicate lock on index root
List pgsql-hackers
Dan Ports  wrote:
> On Tue, Jun 07, 2011 at 07:45:43PM -0500, Kevin Grittner wrote:
>> During testing of the SSI DDL changes I noticed that a REINDEX
>> INDEX created a predicate lock on page 0 of the index.
> 
> Really? That surprises me, and I couldn't reproduce it just now.
You're right; that one was a false alarm.  While REINDEX was reading
the heap to build the index it got an SIREAD lock on a *heap* page.
While that could arguably be avoided, even though the heap is being
read in a serializable transaction, I'm not inclined to get really
excited about it.  If someone wants to dodge it, they can always run
the REINDEX in READ COMMITTED or REPEATABLE READ mode.  Maybe 9.2
material if there's nothing to do that matters more than that.
"Move along; there's nothing to see here, folks...."
-Kevin


pgsql-hackers by date:

Previous
From: Dan Ports
Date:
Subject: Re: reindex creates predicate lock on index root
Next
From: Bruce Momjian
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch