diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 32a51dbd8c6..c467c8bdae7 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -6885,6 +6885,8 @@
in the same way as in pg_description or
pg_depend). Also, the right to extend a
relation is represented as a separate lockable object.
+ Also, advisory> locks can be taken on numbers that have
+ user-defined meanings.
@@ -6985,9 +6987,7 @@
any OID column
OID of the object within its system catalog, or null if the
- object is not 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).
+ object is not a general database object
@@ -6995,10 +6995,11 @@
smallint
- For a table column, this is the column number (the
+ Column number targeted by the lock (the
classid> and objid> refer to the
- table itself). For all other object types, this column is
- zero. Null if the object is not a general database object
+ table itself),
+ or zero if the target is some other general database object,
+ or null if the target is not a general database object
@@ -7015,7 +7016,7 @@
Process ID of the server process holding or awaiting this
- lock. Null if the lock is held by a prepared transaction.
+ lock, or null if the lock is held by a prepared transaction
@@ -7068,7 +7069,8 @@
Advisory locks can be acquired on keys consisting of either a single
- bigint value or two integer values. A bigint key is displayed with its
+ bigint value or two integer values.
+ A bigint key is displayed with its
high-order half in the classid> column, its low-order half
in the objid> column, and objsubid> equal
to 1. Integer keys are displayed with the first key in the
@@ -7078,21 +7080,6 @@
so the database> column is meaningful for an advisory lock.
-
- The pg_locks view displays data from both the
- regular lock manager and the predicate lock manager, which are
- separate systems. When this view is accessed, the internal data
- structures of each lock manager are momentarily locked, and copies are
- made for the view to display. Each lock manager will therefore
- produce a consistent set of results, but as we do not lock both lock
- managers simultaneously, it is possible for locks to be taken or
- released after we interrogate the regular lock manager and before we
- interrogate the predicate lock manager. Each lock manager is only
- locked for the minimum possible time so as to reduce the performance
- impact of querying this view, but there could nevertheless be some
- impact on database performance if it is frequently accessed.
-
-
pg_locks provides a global view of all locks
in the database cluster, not only those relevant to the current database.
@@ -7117,6 +7104,21 @@
but it continues to hold the locks it acquired while running.)
+
+ The pg_locks view displays data from both the
+ regular lock manager and the predicate lock manager, which are
+ separate systems. When this view is accessed, the internal data
+ structures of each lock manager are momentarily locked, and copies are
+ made for the view to display. Each lock manager will therefore
+ produce a consistent set of results, but as we do not lock both lock
+ managers simultaneously, it is possible for locks to be taken or
+ released after we interrogate the regular lock manager and before we
+ interrogate the predicate lock manager. Each lock manager is only
+ locked for the minimum possible time so as to reduce the performance
+ impact of querying this view, but there could nevertheless be some
+ impact on database performance if it is frequently accessed.
+
+