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

From Alvaro Herrera
Subject Re: reindex creates predicate lock on index root
Date
Msg-id 1307509525-sup-9007@alvh.no-ip.org
Whole thread Raw
In response to reindex creates predicate lock on index root  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
Excerpts from Kevin Grittner's message of mar jun 07 20:45:43 -0400 2011:
> During testing of the SSI DDL changes I noticed that a REINDEX INDEX
> created a predicate lock on page 0 of the index.

Err, in a btree, page 0 is the metapage, not the root.  The root page
moves around, but it's never page 0 (it starts at page 1).  I think GIN
indexes also have metapages, not sure about the others.

Not sure if this changes your reasoning at all, just thought it was
worth mentioning.

> This is pretty
> harmless, but mildly annoying.  There are a few other places where
> it would be good to suppress predicate locks; these are listed on
> the R&D section of the Wiki.  I hope to clean some of these up in
> 9.2. Unless a very clean and safe fix for the subject issue pops out
> on further review, I'll add this to that list.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch
Next
From: Tom Lane
Date:
Subject: Re: [Pgbuildfarm-members] CREATE FUNCTION hang on test machine polecat on HEAD