Doc: clarify pg_locks descriptions of classid/objid/objsubid - Mailing list pgsql-docs

From Hiroki Takamatsu
Subject Doc: clarify pg_locks descriptions of classid/objid/objsubid
Date
Msg-id CA+r=ywWUHOPgHp-tegoETpfjiEkE5Ytzi4g9orcKav8bWym+_Q@mail.gmail.com
Whole thread
List pgsql-docs
Hi hackers,

It seems that the descriptions of classid, objid, and objsubid in the
pg_locks documentation are not quite accurate for all lock types.
The documentation currently says these columns are null if the lock
target is not a general database object.
However, pg_lock_status() (lockfuncs.c) also populates these columns
for other lock types, including advisory locks,
speculative insertion locks, and apply transaction locks.
The detailed prose below the table already describes
some of these uses, so the table entries and the prose seem to be
inconsistent.

The attached patch:

1. rewrites each column description to scope it to the general database
   object case, instead of making a false claim about NULL behavior for
   all other lock types;
2. adds a pointer to the detailed per-lock-type prose below; and
3. documents that apply transaction locks show the subscription OID in
   objid.

I chose not to enumerate all non-object lock types in the column
descriptions, since that seemed easy to let drift again as new lock
types are added.

Do you think?

Regards,
Hiroki Takamatsu

Attachment

pgsql-docs by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: cmax docs seem misleading
Next
From: Tom Lane
Date:
Subject: Re: Correct docs about GiST leaf page structure