pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
COMMENT ON lock
4+ messages / 3 participants
[nested] [flat]

* COMMENT ON lock
@ 2022-01-18 14:11  nikolai.berkoff <nikolai.berkoff@pm.me>
  0 siblings, 1 reply; 4+ messages in thread

From: nikolai.berkoff @ 2022-01-18 14:11 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

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

Attachments:

  [text/x-patch] comment_on_lock.patch (1.4K, ../../_0HDHIGcCdCsUyXn22QwI2FEuNR6Fs71rtgGX6hfyBlUh5rrnE2qMmvIFu9EY4Pijr2gUmJEAXCjuNU2Oxku9TryLp9CdHllpsCfN3gD0-Y=@pm.me/2-comment_on_lock.patch)
  download | inline diff:
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>


  [application/pgp-signature] signature.asc (507B, ../../_0HDHIGcCdCsUyXn22QwI2FEuNR6Fs71rtgGX6hfyBlUh5rrnE2qMmvIFu9EY4Pijr2gUmJEAXCjuNU2Oxku9TryLp9CdHllpsCfN3gD0-Y=@pm.me/3-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: COMMENT ON lock
@ 2022-01-18 14:37  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: nikolai.berkoff <nikolai.berkoff@pm.me>
  0 siblings, 1 reply; 4+ messages in thread

From: Laurenz Albe @ 2022-01-18 14:37 UTC (permalink / raw)
  To: nikolai.berkoff <nikolai.berkoff@pm.me>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Tue, 2022-01-18 at 14:11 +0000, nikolai.berkoff wrote:
> 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.

+1, but SHARE ACCESS EXCLUSIVE should be marked up with <literal>.

Yours,
Laurenz Albe






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: COMMENT ON lock
@ 2022-01-19 04:45  Michael Paquier <michael@paquier.xyz>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 4+ messages in thread

From: Michael Paquier @ 2022-01-19 04:45 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: nikolai.berkoff <nikolai.berkoff@pm.me>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Tue, Jan 18, 2022 at 03:37:35PM +0100, Laurenz Albe wrote:
> On Tue, 2022-01-18 at 14:11 +0000, nikolai.berkoff wrote:
>> 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.
> 
> +1.

No objections to add more details for all that.  Will fix.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../YeeXUwWDDIklu9D+@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: COMMENT ON lock
@ 2022-01-20 08:01  Michael Paquier <michael@paquier.xyz>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2022-01-20 08:01 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: nikolai.berkoff <nikolai.berkoff@pm.me>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Wed, Jan 19, 2022 at 01:45:07PM +0900, Michael Paquier wrote:
> No objections to add more details for all that.  Will fix.

And done as of b2a76bb.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../YekWw9l2cTiK6VQx@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-01-20 08:01 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 14:11 COMMENT ON lock nikolai.berkoff <nikolai.berkoff@pm.me>
2022-01-18 14:37 ` Laurenz Albe <laurenz.albe@cybertec.at>
2022-01-19 04:45   ` Michael Paquier <michael@paquier.xyz>
2022-01-20 08:01     ` Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox