From: | Florian Pflug <fgp(at)phlo(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Need help understanding pg_locks |
Date: | 2011-07-13 16:05:17 |
Message-ID: | A9081374-9F00-4F6E-9F40-DE9820CAA30B@phlo.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Jul13, 2011, at 17:44 , Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> OK, I went with this wording, using "lock object is on" terminology.
>> Applied patch attached --- adjustments welcomed.
>
> I think you misunderstood the suggestion. This is not an improvement,
> it's just more confusion.
FWIW, I agree. First, "lock object" seems redundant - you might just as
well say simply "lock". This is different from "locked object" - there,
the noun "object" servers as a dummy that gives the adjective "locked"
something to refer to.
Also, it now sounds as if we were talking about the storage
location of the lock (as an entity in itself) in some of the sentences.
Here's an example
"Page number within the relation, or null if the lock object
is not on a tuple or relation page".
To me at least, that sounds as if the lock might somehow be stored
on a "relation page".
Maybe "on" is still too generic. What if we said "protects" instead?
That makes the intended relationship between the lock and the
tuple/relation/... much clearer. We'd then say
(A)
"Protected page number within the relation, or null if the lock
does not protect a tuple or relation page".
Another possibility is to make the relationship clearer by adding
the adjective "locked" before the locked thing, as in
(B)
"Locked page number within the relation, or null if the lock
is not on a tuple or relation page".
The latter also works "lock .. on .. " with
"locked object ... is ...", i.e.
(C)
"Locked page number within the relation, or null if the locked object
is not a tuple or relation page".
We could also get rid of the noun completely by saying
(D)
"Locked page number within the relation, or null if it isn't
a tuple or relation page that is locked".
I personally slightly favor (D).
best regards,
Florian Pflug
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-07-13 16:07:31 | Re: Need help understanding pg_locks |
Previous Message | Bruce Momjian | 2011-07-13 16:03:33 | Re: Need help understanding pg_locks |