From b244129c2ec77aa96be423d6e859c29f1e319b0e Mon Sep 17 00:00:00 2001 From: Hiroki Takamatsu Date: Mon, 30 Mar 2026 07:13:25 +0000 Subject: [PATCH] clarify pg_locks descriptions of classid/objid/objsubid --- doc/src/sgml/system-views.sgml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml index 9ee1a2bfc6a..a72295801b7 100644 --- a/doc/src/sgml/system-views.sgml +++ b/doc/src/sgml/system-views.sgml @@ -1905,8 +1905,9 @@ AND c1.path[c2.level] = c2.path[c2.level]; (references pg_class.oid) - OID of the system catalog containing the lock target, or null if the - target is not a general database object + For a general database object, the OID of the system catalog + containing the lock target. + This column is also used for other lock types; see below. @@ -1916,8 +1917,9 @@ AND c1.path[c2.level] = c2.path[c2.level]; (references any OID column) - OID of the lock target within its system catalog, or null if the - target is not a general database object + For a general database object, the OID of the lock target within + its system catalog. + This column is also used for other lock types; see below. @@ -1926,11 +1928,12 @@ AND c1.path[c2.level] = c2.path[c2.level]; objsubid int2 - Column number targeted by the lock (the + For a general database object, the column number targeted by the + lock (the classid and objid refer to the table itself), - or zero if the target is some other general database object, - or null if the target is not a general database object + or zero if the target is some other general database object. + This column is also used for other lock types; see below. @@ -2053,7 +2056,9 @@ AND c1.path[c2.level] = c2.path[c2.level]; Apply transaction locks are used in parallel mode to apply the transaction in logical replication. The remote transaction ID is displayed in the - transactionid column. The objsubid + transactionid column. The OID of the subscription is + displayed in the objid column. + The objsubid displays the lock subtype which is 0 for the lock used to synchronize the set of changes, and 1 for the lock used to wait for the transaction to finish to ensure commit order. -- 2.47.3