summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2008-03-06 18:49:32 +0000
committerBruce Momjian <bruce@momjian.us>2008-03-06 18:49:32 +0000
commit2b70548bd448f206427050cf7c35f508001fec1b (patch)
tree479e3141de3ae58f701427649cf9db9664073d56
parent4f887c6bf05dea2efdcedb5bd50aa4db9cdbff23 (diff)
Document use of pg_locks.objid for advisory locks, suggestion from Marc Mamin
-rw-r--r--doc/src/sgml/catalogs.sgml7
-rw-r--r--doc/src/sgml/func.sgml5
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index de045d7057d..8a16c77a7dd 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.161 2008/01/31 18:40:02 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.162 2008/03/06 18:49:32 momjian Exp $ -->
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
-->
@@ -5691,7 +5691,10 @@
<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>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 056d12a1688..1052ab0d670 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.422 2008/03/03 18:09:02 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.423 2008/03/06 18:49:32 momjian Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
@@ -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