Re: reindex creates predicate lock on index root

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <drkp(at)csail(dot)mit(dot)edu>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reindex creates predicate lock on index root
Date: 2011-06-08 03:37:22
Message-ID: 4DEEA822020000250003E2C9@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-06-08 04:19:21 Re: reducing the overhead of frequent table locks - now, with WIP patch
Previous Message Dan Ports 2011-06-08 03:02:26 Re: reindex creates predicate lock on index root