Re: Need help understanding pg_locks

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Need help understanding pg_locks
Дата
Msg-id A9081374-9F00-4F6E-9F40-DE9820CAA30B@phlo.org
обсуждение исходный текст
Ответ на Re: Need help understanding pg_locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Need help understanding pg_locks
Re: Need help understanding pg_locks
Список pgsql-hackers
On Jul13, 2011, at 17:44 , Tom Lane wrote:
> Bruce Momjian <bruce@momjian.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





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Need help understanding pg_locks
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Need help understanding pg_locks