Skip to content

Commit 2b70548

Browse files
committed
Document use of pg_locks.objid for advisory locks, suggestion from Marc Mamin
1 parent 4f887c6 commit 2b70548

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.161 2008/01/31 18:40:02 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.162 2008/03/06 18:49:32 momjian Exp $ -->
22
<!--
33
Documentation of the system catalogs, directed toward PostgreSQL developers
44
-->
@@ -5691,7 +5691,10 @@
56915691
<entry>any OID column</entry>
56925692
<entry>
56935693
OID of the object within its system catalog, or NULL if the
5694-
object is not a general database object
5694+
object is not a general database object.
5695+
For advisory locks it is used to distinguish the two key
5696+
spaces (<literal>1</> for an int8 key, <literal>2</> for two
5697+
int4 keys).
56955698
</entry>
56965699
</row>
56975700
<row>

doc/src/sgml/func.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.422 2008/03/03 18:09:02 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.423 2008/03/06 18:49:32 momjian Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -12378,7 +12378,8 @@ SELECT (pg_stat_file('filename')).modification;
1237812378
<para>
1237912379
<function>pg_advisory_lock</> locks an application-defined resource,
1238012380
which can be identified either by a single 64-bit key value or two
12381-
32-bit key values (note that these two key spaces do not overlap). If
12381+
32-bit key values (note that these two key spaces do not overlap).
12382+
The key type is specified in <literal>pg_locks.objid</>. If
1238212383
another session already holds a lock on the same resource, the
1238312384
function will wait until the resource becomes available. The lock
1238412385
is exclusive. Multiple lock requests stack, so that if the same resource

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy