Skip to content

Commit b2a76bb

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 7a5f6b4 commit b2a76bb

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

doc/src/sgml/mvcc.sgml

+4-3
Original file line numberDiff line numberDiff line change
@@ -950,10 +950,11 @@ 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>, <command>COMMENT ON</command>,
953954
<command>REINDEX CONCURRENTLY</command>,
954-
<command>CREATE STATISTICS</command>, and certain <link linkend="sql-alterindex"><command>ALTER
955-
INDEX</command></link> and <link linkend="sql-altertable"><command>ALTER TABLE</command></link> variants (for full
956-
details see the documentation of these commands).
955+
and certain <link linkend="sql-alterindex"><command>ALTER INDEX</command></link>
956+
and <link linkend="sql-altertable"><command>ALTER TABLE</command></link> variants
957+
(for full details see the documentation of these commands).
957958
</para>
958959
</listitem>
959960
</varlistentry>

doc/src/sgml/ref/comment.sgml

+5
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)