On Thu, 2010-01-07 at 15:02 -0500, Robert Haas wrote: > > I think we're still talking past the issue. Predicate locks are not > > row level, nor page level, nor table level. > > They're not? They're just floating out in space somewhere? There are > several possible ways to implement predicate locks, but every possible > method I can think of involves attaching them at one of those places.
Consider an exclusion constraint, which is a kind of predicate lock. You could say that the lock is in the index (now) -- but my first implementation used a shared memory structure instead, so it's clearly not required to exist in the index. You could also say that the lock is really attached to the table, because there are catalog entries connected to the table that express the constraint -- but I think that's splitting hairs. What Greg is saying (as I understand it) is that the lock conflicts with tuples that don't even exist yet. We can tack them on to any structure that's convenient, of course. But just because you want to implement them by locking a few index pages (assuming there is an index) doesn't mean we should reject Greg's line of thinking. Regards, Jeff Davis -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers