From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | heikki(dot)linnakangas(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: SSI modularity questions |
Date: | 2011-06-28 18:31:21 |
Message-ID: | BANLkTin8mMUf=0_R2Q3Zp5xLaHjmvU8idQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 28, 2011 at 1:47 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> (5) When a heap scan is executed, there is no index gap to lock to
> cover the predicate involved, so we need to acquire a heap relation
> lock -- any insert to the relation by an overlapping transaction is a
> rw-conflict. While these *look* just like tuple locks which got
> promoted, their purpose is entirely different. Like index locks,
> they are for detecting inserts into the "gaps". [Light bulb goes on
> over head: in some future release, perhaps it would be worth
> differentiating between the two uses of heap relation locks, to
> reduce the frequency of false positives. A couple bit flags in the
> lock structure might do it.]
You know, it just occurred to me while reading this email that you're
using the term "predicate lock" in a way that is totally different
from what I learned in school. What I was taught is that the word
"predicate" in "predicate lock" is like the word "tuple" in "tuple
lock" or the word "relation" in "relation lock" - that is, it
describes *the thing being locked*. In other words, you are
essentially doing:
LOCK TABLE foo WHERE i = 1;
I think that what you're calling the predicate lock manager should
really be called the siread lock manager, and all of the places where
you are "predicate locking" a tuple should really be "siread locking"
the tuple.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Florian Pflug | 2011-06-28 18:33:57 | Re: spinlock contention |
Previous Message | Heikki Linnakangas | 2011-06-28 18:29:35 | Re: SSI modularity questions |