I wanted to know what lock the COMMENT ON command took and I had to look in the source code, makes sense to me that it should be documented. I've also added it to the list of commands that take a SHARE UPDATE EXCLUSIVE lock.
Regards, Nikolai
diff --git i/doc/src/sgml/mvcc.sgml w/doc/src/sgml/mvcc.sgml
index cfdcb742..06ed5985 100644
--- i/doc/src/sgml/mvcc.sgml
+++ w/doc/src/sgml/mvcc.sgml
@@ -951,7 +951,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
Acquired by <command>VACUUM</command> (without <option>FULL</option>),
<command>ANALYZE</command>, <command>CREATE INDEX CONCURRENTLY</command>,
<command>REINDEX CONCURRENTLY</command>,
- <command>CREATE STATISTICS</command>, and certain <link linkend="sql-alterindex"><command>ALTER
+ <command>CREATE STATISTICS</command>, <command>COMMENT ON</command>, and certain <link linkend="sql-alterindex"><command>ALTER
INDEX</command></link> and <link linkend="sql-altertable"><command>ALTER TABLE</command></link> variants (for full
details see the documentation of these commands).
</para>
diff --git i/doc/src/sgml/ref/comment.sgml w/doc/src/sgml/ref/comment.sgml
index e07fc47f..04361e73 100644
--- i/doc/src/sgml/ref/comment.sgml
+++ w/doc/src/sgml/ref/comment.sgml
@@ -88,6 +88,7 @@ COMMENT ON
issue a new <command>COMMENT</command> command for the same object. To remove a
comment, write <literal>NULL</literal> in place of the text string.
Comments are automatically dropped when their object is dropped.
+ A SHARE UPDATE EXCLUSIVE lock is acquired on the object.
</para>
<para>
signature.asc
Description: OpenPGP digital signature
