Skip to content

Commit 44ab2da

Browse files
committed
doc: Mention the level of locks taken on objects in COMMENT
This information was nowhere to be found. This adds one note on the page of COMMENT, and one note in the section dedicated to explicit locking, both telling that a SHARE UPDATE EXCLUSIVE lock is taken on the object commented. Author: Nikolai Berkoff Reviewed-by: Laurenz Albe Discussion: https://postgr.es/m/_0HDHIGcCdCsUyXn22QwI2FEuNR6Fs71rtgGX6hfyBlUh5rrnE2qMmvIFu9EY4Pijr2gUmJEAXCjuNU2Oxku9TryLp9CdHllpsCfN3gD0-Y=@pm.me Backpatch-through: 10
1 parent 99aa0ff commit 44ab2da

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/src/sgml/mvcc.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
950950
<para>
951951
Acquired by <command>VACUUM</command> (without <option>FULL</option>),
952952
<command>ANALYZE</command>, <command>CREATE INDEX CONCURRENTLY</command>,
953-
<command>CREATE STATISTICS</command> and
953+
<command>CREATE STATISTICS</command>, <command>COMMENT ON</command> and
954954
<command>ALTER TABLE VALIDATE</command> and other
955955
<command>ALTER TABLE</command> variants (for full details see
956956
<xref linkend="sql-altertable"/>).

doc/src/sgml/ref/comment.sgml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ COMMENT ON
9090
Comments are automatically dropped when their object is dropped.
9191
</para>
9292

93+
<para>
94+
A <literal>SHARE UPDATE EXCLUSIVE</literal> lock is acquired on the
95+
object to be commented.
96+
</para>
97+
9398
<para>
9499
For most kinds of object, only the object's owner can set the comment.
95100
Roles don't have owners, so the rule for <literal>COMMENT ON ROLE</literal> is

0 commit comments

Comments
 (0)