Document use of pg_locks.objid for advisory locks, suggestion from Marc Mamin
authorBruce Momjian <bruce@momjian.us>
Thu, 6 Mar 2008 18:49:32 +0000 (18:49 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 6 Mar 2008 18:49:32 +0000 (18:49 +0000)
doc/src/sgml/catalogs.sgml
doc/src/sgml/func.sgml

index effa9072d4c589f8e0a0ba6a84bb3a98dd31b281..78b9faf479784e92297601760b2630e5d94ac7cc 100644 (file)
       <entry>any OID column</entry>
       <entry>
        OID of the object within its system catalog, or NULL if the
-       object is not a general database object
+       object is not a general database object.
+       For advisory locks it is used to distinguish the two key
+       spaces (<literal>1</> for an int8 key, <literal>2</> for two
+       int4 keys).
       </entry>
      </row>
      <row>
index 00b1ef08cdd1d230a0990a5968f48afdb8d861d5..2bead2bdfd163fe740d56fecce3773987ca09359 100644 (file)
@@ -12378,7 +12378,8 @@ SELECT (pg_stat_file('filename')).modification;
    <para>
     <function>pg_advisory_lock</> locks an application-defined resource,
     which can be identified either by a single 64-bit key value or two
-    32-bit key values (note that these two key spaces do not overlap).  If
+    32-bit key values (note that these two key spaces do not overlap). 
+    The key type is specified in <literal>pg_locks.objid</>.  If
     another session already holds a lock on the same resource, the
     function will wait until the resource becomes available.  The lock
     is exclusive.  Multiple lock requests stack, so that if the same resource