Re: Need help understanding pg_locks

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: Need help understanding pg_locks
Дата
Msg-id
201107141706.p6EH69105964@momjian.us
Ответ на
Список
Дерево обсуждения
Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Tom Lane <tgl@sss.pgh.pa.us>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Tom Lane <tgl@sss.pgh.pa.us>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Tom Lane <tgl@sss.pgh.pa.us>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Tom Lane <tgl@sss.pgh.pa.us>
Re: Need help understanding pg_locks Andrew Dunstan <andrew@dunslane.net>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Florian Pflug <fgp@phlo.org>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Bruce Momjian <bruce@momjian.us>
Re: Need help understanding pg_locks Tom Lane <tgl@sss.pgh.pa.us>
Florian Pflug wrote:
> On Jul13, 2011, at 21:08 , Bruce Momjian wrote:
> > -       OID of the database in which the object exists, or
> > -       zero if the object is a shared object, or
> > -       null if the lock object is on a transaction ID
> > +       OID of the database in which the lock target exists, or
> > +       zero if the lock is a shared object, or
> > +       null if the lock is on a transaction ID
> 
> This sounds good.
> 
> > +       OID of the relation lock target, or null if the lock is not
> >        on a relation or part of a relation
> 
> That, however, not so much. "relation lock target" might easily
> be interpreted as the "relation's lock target" or the
> "relation lock's target" - at least by non-native speakers such
> as myself. The same is true fro "transaction lock target" and
> friends.
> 
> Can't we simply go with "Locked relation", "Locked transaction id"
> and so on (as in my versions B,C and D up-thread)? I can't really
> get excited about the slight imprecision caused by the fact that some
> rows describe aspiring lock holders instead of current lock holders.
> The existence of the "granted" column makes the situation pretty clear.
> 
> Plus, it's technically not even wrong - a process is waiting because
> somebody else *is* actually holding a lock on the object. So
> the tuple/transaction/... is, in fact, a "Locked tuple/transaction/..."

I think it will be very confusing to have "locked" refer to the person
holding the lock while the row is based on who is waiting for it.

I reworded that line to:

+       OID of the relation of the lock target, or null if the lock is not

Update patch attached.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index c5851af..84c2257 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -6928,9 +6928,9 @@
       oid
       pg_database.oid
       
-       OID of the database in which the object exists, or
-       zero if the object is a shared object, or
-       null if the lock object is on a transaction ID
+       OID of the database in which the lock target exists, or
+       zero if the lock is a shared object, or
+       null if the lock is on a transaction ID
       
      
      
@@ -6938,7 +6938,7 @@
       oid
       pg_class.oid
       
-       OID of the relation, or null if the lock object is not
+       OID of the relation of the lock target, or null if the lock is not
        on a relation or part of a relation
       
      
@@ -6947,7 +6947,7 @@
       integer
       
       
-       Page number within the relation, or null if the lock object
+       Page number within the relation, or null if the lock
        is not on a tuple or relation page
       
      
@@ -6956,7 +6956,7 @@
       smallint
       
       
-       Tuple number within the page, or null if the lock object is not
+       Tuple number within the page, or null if the lock is not
        on a tuple
       
      
@@ -6965,7 +6965,7 @@
       text
       
       
-       Virtual ID of a transaction lock, or null if the lock object is not
+       Virtual ID of a transaction lock target, or null if the lock is not
        on a virtual transaction ID
       
      
@@ -6974,7 +6974,7 @@
       xid
       
       
-       ID of a transaction lock, or null if the lock object is not on a transaction ID
+       ID of a transaction lock target, or null if the lock is not on a transaction ID
       
      
      
@@ -6982,8 +6982,8 @@
       oid
       pg_class.oid
       
-       OID of the system catalog containing the object, or null if the
-       lock object is not on a general database object.
+       OID of the system catalog containing the lock target, or null if the
+       lock is not on a general database object.
       
      
      
@@ -6992,7 +6992,7 @@
       any OID column
       
        OID of the object within its system catalog, or null if the
-       lock object is not on a general database object.
+       lock is not on a general database object.
        For advisory locks it is used to distinguish the two key
        spaces (1 for an int8 key, 2 for two int4 keys).
       
@@ -7005,7 +7005,7 @@
        For a table column, this is the column number (the
        classid</> and objid</> refer to the
        table itself).  For all other object types, this column is
-       zero.  Null if the lock object is not on a general database object.
+       zero.  Null if the lock is not on a general database object.
       
      
      
В списке pgsql-hackers по дате отправления
От: David E. Wheeler
Дата:
Сообщение: Re: pg_class.relistemp
От: Robert Haas
Дата:
Сообщение: Re: help with sending email
FAQ