doc: Mention the level of locks taken on objects in COMMENT
authorMichael Paquier
Thu, 20 Jan 2022 07:54:47 +0000 (16:54 +0900)
committerMichael Paquier
Thu, 20 Jan 2022 07:54:47 +0000 (16:54 +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 cfdcb74221a12ca5faf1e71f8bccc486619d5841..6c94f6a942902e3227346c0def67f9d515abf592 100644 (file)
@@ -950,10 +950,11 @@ ERROR:  could not serialize access due to read/write dependencies among transact
         
          Acquired by VACUUM (without ),
          ANALYZECREATE INDEX CONCURRENTLY,
+         CREATE STATISTICSCOMMENT ON,
          REINDEX CONCURRENTLY,
-         CREATE STATISTICS, and certain ALTER
-         INDEX and ALTER TABLE variants (for full
-         details see the documentation of these commands).
+         and certain ALTER INDEX
+         and ALTER TABLE variants
+         (for full details see the documentation of these commands).
         
        
       
index e07fc47fd3145c039bfa43c123a439c84179c6ae..b12796095fbe10e772d81d065fe4b348a57aa379 100644 (file)
@@ -90,6 +90,11 @@ COMMENT ON
    Comments are automatically dropped when their object is dropped.
   
 
+  
+   A SHARE UPDATE EXCLUSIVE lock is acquired on the
+   object to be commented.
+  
+
   
    For most kinds of object, only the object's owner can set the comment.
    Roles don't have owners, so the rule for COMMENT ON ROLE is