doc: Mention the level of locks taken on objects in COMMENT
authorMichael Paquier <[email protected]>
Thu, 20 Jan 2022 07:55:12 +0000 (16:55 +0900)
committerMichael Paquier <[email protected]>
Thu, 20 Jan 2022 07:55:12 +0000 (16:55 +0900)
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

doc/src/sgml/mvcc.sgml
doc/src/sgml/ref/comment.sgml

index 3c28a9f8e687f4e8c02201b12b5b7d4d7be2e7f9..de91a85e5e8a4acd3a87031cbf0e647764ff38e9 100644 (file)
@@ -950,7 +950,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
         <para>
          Acquired by <command>VACUUM</command> (without <option>FULL</option>),
          <command>ANALYZE</>, <command>CREATE INDEX CONCURRENTLY</>,
-         <command>CREATE STATISTICS</> and
+         <command>CREATE STATISTICS</>, <command>COMMENT ON</> and
          <command>ALTER TABLE VALIDATE</command> and other
          <command>ALTER TABLE</command> variants (for full details see
          <xref linkend="SQL-ALTERTABLE">).
index df328117f1d803adfa8cf9957747fd70fdf8576e..7a31dd08bed1ca90be9c2b4247ba255ee2625471 100644 (file)
@@ -88,6 +88,11 @@ COMMENT ON
    Comments are automatically dropped when their object is dropped.
   </para>
 
+  <para>
+   A <literal>SHARE UPDATE EXCLUSIVE</literal> lock is acquired on the
+   object to be commented.
+  </para>
+
   <para>
    For most kinds of object, only the object's owner can set the comment.
    Roles don't have owners, so the rule for <literal>COMMENT ON ROLE</> is