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

From Tom Lane
Subject Re: reindex creates predicate lock on index root
Date
Msg-id 26899.1307499270@sss.pgh.pa.us
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
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> During testing of the SSI DDL changes I noticed that a REINDEX INDEX
> created a predicate lock on page 0 of the index.  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.

Do you mean page zero, as in the metapage (for most index types), or do
you mean the root page?  If the former, how is that not an outright bug,
since it corresponds to no data?  If the latter, how is that not a
serious performance problem, since it corresponds to locking the entire
index?  Any way you slice it, it sounds like a pretty bad bug.

It's not apparent to me why an index build (regular or reindex) should
create any predicate locks at all, ever.  Surely it's a basically
nontransactional operation that SSI should keep its fingers out of.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Domains versus polymorphic functions, redux
Next
From: Fujii Masao
Date:
Subject: Re: WALInsertLock tuning