From: Michael Paquier Date: Thu, 20 Jan 2022 07:55:12 +0000 (+0900) Subject: doc: Mention the level of locks taken on objects in COMMENT X-Git-Tag: REL_10_20~24 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=6fc08323b5368f74ad0e4030104d42a28e24ca14;p=postgresql.git 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 --- diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 3c28a9f8e68..de91a85e5e8 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -950,7 +950,7 @@ ERROR: could not serialize access due to read/write dependencies among transact Acquired by VACUUM (without ), ANALYZE, CREATE INDEX CONCURRENTLY, - CREATE STATISTICS and + CREATE STATISTICS, COMMENT ON and ALTER TABLE VALIDATE and other ALTER TABLE variants (for full details see ). diff --git a/doc/src/sgml/ref/comment.sgml b/doc/src/sgml/ref/comment.sgml index df328117f1d..7a31dd08bed 100644 --- a/doc/src/sgml/ref/comment.sgml +++ b/doc/src/sgml/ref/comment.sgml @@ -88,6 +88,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