aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-01-20 16:54:58 +0900
committerMichael Paquier <michael@paquier.xyz>2022-01-20 16:54:58 +0900
commit3ca40a2b18a0638994e35160dfc8d392b1aef898 (patch)
treeec6636a704325c08c4ea77c3c200e9e2d3a560f2
parent6eec809fbcfbd8e0ab5e1c6485c7f53020f0d0b0 (diff)
downloadpostgresql-3ca40a2b18a0638994e35160dfc8d392b1aef898.tar.gz
postgresql-3ca40a2b18a0638994e35160dfc8d392b1aef898.zip
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
-rw-r--r--doc/src/sgml/mvcc.sgml9
-rw-r--r--doc/src/sgml/ref/comment.sgml5
2 files changed, 10 insertions, 4 deletions
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
index 5e3b7477e38..23c5a2d1cb4 100644
--- a/doc/src/sgml/mvcc.sgml
+++ b/doc/src/sgml/mvcc.sgml
@@ -950,11 +950,12 @@ 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>, <command>CREATE INDEX CONCURRENTLY</command>,
+ <command>CREATE STATISTICS</command>, <command>COMMENT ON</command>,
<command>REINDEX CONCURRENTLY</command>,
- <command>CREATE STATISTICS</command>, and certain <command>ALTER
- INDEX</command> and <command>ALTER TABLE</command> variants (for full
- details see <xref linkend="sql-alterindex"/> and <xref
- linkend="sql-altertable"/>).
+ and certain <command>ALTER INDEX</command> and
+ <command>ALTER TABLE</command> variants
+ (for full details see <xref linkend="sql-alterindex"/> and
+ <xref linkend="sql-altertable"/>).
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/comment.sgml b/doc/src/sgml/ref/comment.sgml
index fd7492a2556..138cf718ce1 100644
--- a/doc/src/sgml/ref/comment.sgml
+++ b/doc/src/sgml/ref/comment.sgml
@@ -91,6 +91,11 @@ COMMENT ON
</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</literal> is
that you must be superuser to comment on a superuser role, or have the