pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to reference the type of lock in the documentation.
5+ messages / 3 participants
[nested] [flat]

* How to reference the type of lock in the documentation.
@ 2022-06-29 20:45 PG Doc comments form <noreply@postgresql.org>
  2022-07-08 01:20 ` Re: How to reference the type of lock in the documentation. Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 5+ messages in thread

From: PG Doc comments form @ 2022-06-29 20:45 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: troy@frericks.us

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/explicit-locking.html
Description:

On page https://www.postgresql.org/docs/10/explicit-locking.html, I'd like
to suggest a search-engine-optimization improvement. Generally, but
especially on this page, it'd be nice to have the lock name along with the
user-friendly name. For example, with the first use of "SHARE UPDATE
EXCLUSIVE", I'd like to see the lock name with it, for example, "SHARE
UPDATE EXCLUSIVE (ShareUpdateExclusiveLock)". 
Troy.
#


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

* Re: How to reference the type of lock in the documentation.
  2022-06-29 20:45 How to reference the type of lock in the documentation. PG Doc comments form <noreply@postgresql.org>
@ 2022-07-08 01:20 ` Bruce Momjian <bruce@momjian.us>
  2022-07-08 02:12   ` Re: How to reference the type of lock in the documentation. Masahiko Sawada <sawada.mshk@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Bruce Momjian @ 2022-07-08 01:20 UTC (permalink / raw)
  To: troy@frericks.us; pgsql-docs@lists.postgresql.org

On Wed, Jun 29, 2022 at 08:45:11PM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/10/explicit-locking.html
> Description:
> 
> On page https://www.postgresql.org/docs/10/explicit-locking.html, I'd like
> to suggest a search-engine-optimization improvement. Generally, but
> especially on this page, it'd be nice to have the lock name along with the
> user-friendly name. For example, with the first use of "SHARE UPDATE
> EXCLUSIVE", I'd like to see the lock name with it, for example, "SHARE
> UPDATE EXCLUSIVE (ShareUpdateExclusiveLock)". 

I see your point --- that the names that appear in the pg_locks view
don't appear in our documentation.  The attached patches adds the
pg_locks names after each lock name.  You can see the doc output here:

	https://momjian.us/tmp/pgsql/explicit-locking.html

If people like this, I can apply it to all supported branches.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson

Attachments:

  [text/x-diff] lock.diff (2.6K, ../../YseGd7IEIK3i7Fw3@momjian.us/2-lock.diff)
  download | inline diff:
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
index ff148bb3dc..ed3d099c72 100644
--- a/doc/src/sgml/mvcc.sgml
+++ b/doc/src/sgml/mvcc.sgml
@@ -907,7 +907,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
       <title>Table-Level Lock Modes</title>
       <varlistentry>
        <term>
-        <literal>ACCESS SHARE</literal>
+        <literal>ACCESS SHARE</literal> / <literal>AccessShareLock</literal>
        </term>
        <listitem>
         <para>
@@ -925,7 +925,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>ROW SHARE</literal>
+        <literal>ROW SHARE</literal> / <literal>RowShareLock</literal>
        </term>
        <listitem>
         <para>
@@ -948,7 +948,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>ROW EXCLUSIVE</literal>
+        <literal>ROW EXCLUSIVE</literal> / <literal>RowExclusiveLock</literal>
        </term>
        <listitem>
         <para>
@@ -971,7 +971,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>SHARE UPDATE EXCLUSIVE</literal>
+        <literal>SHARE UPDATE EXCLUSIVE</literal> / <literal>ShareUpdateExclusiveLock</literal>
        </term>
        <listitem>
         <para>
@@ -997,7 +997,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>SHARE</literal>
+        <literal>SHARE</literal> / <literal>ShareLock</literal>
        </term>
        <listitem>
         <para>
@@ -1017,7 +1017,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>SHARE ROW EXCLUSIVE</literal>
+        <literal>SHARE ROW EXCLUSIVE</literal> / <literal>ShareRowExclusiveLock</literal>
        </term>
        <listitem>
         <para>
@@ -1039,7 +1039,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>EXCLUSIVE</literal>
+        <literal>EXCLUSIVE</literal> / <literal>ExclusiveLock</literal>
        </term>
        <listitem>
         <para>
@@ -1061,7 +1061,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>ACCESS EXCLUSIVE</literal>
+        <literal>ACCESS EXCLUSIVE</literal> / <literal>AccessExclusiveLock</literal>
        </term>
        <listitem>
         <para>

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

* Re: How to reference the type of lock in the documentation.
  2022-06-29 20:45 How to reference the type of lock in the documentation. PG Doc comments form <noreply@postgresql.org>
  2022-07-08 01:20 ` Re: How to reference the type of lock in the documentation. Bruce Momjian <bruce@momjian.us>
@ 2022-07-08 02:12   ` Masahiko Sawada <sawada.mshk@gmail.com>
  2022-07-08 15:17     ` Re: How to reference the type of lock in the documentation. Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Masahiko Sawada @ 2022-07-08 02:12 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: troy@frericks.us; pgsql-docs@lists.postgresql.org

On Fri, Jul 8, 2022 at 10:21 AM Bruce Momjian <bruce@momjian.us> wrote:
>
> On Wed, Jun 29, 2022 at 08:45:11PM +0000, PG Doc comments form wrote:
> > The following documentation comment has been logged on the website:
> >
> > Page: https://www.postgresql.org/docs/10/explicit-locking.html
> > Description:
> >
> > On page https://www.postgresql.org/docs/10/explicit-locking.html, I'd like
> > to suggest a search-engine-optimization improvement. Generally, but
> > especially on this page, it'd be nice to have the lock name along with the
> > user-friendly name. For example, with the first use of "SHARE UPDATE
> > EXCLUSIVE", I'd like to see the lock name with it, for example, "SHARE
> > UPDATE EXCLUSIVE (ShareUpdateExclusiveLock)".
>
> I see your point --- that the names that appear in the pg_locks view
> don't appear in our documentation.  The attached patches adds the
> pg_locks names after each lock name.  You can see the doc output here:
>
>         https://momjian.us/tmp/pgsql/explicit-locking.html
>
> If people like this, I can apply it to all supported branches.

+1

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/





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

* Re: How to reference the type of lock in the documentation.
  2022-06-29 20:45 How to reference the type of lock in the documentation. PG Doc comments form <noreply@postgresql.org>
  2022-07-08 01:20 ` Re: How to reference the type of lock in the documentation. Bruce Momjian <bruce@momjian.us>
  2022-07-08 02:12   ` Re: How to reference the type of lock in the documentation. Masahiko Sawada <sawada.mshk@gmail.com>
@ 2022-07-08 15:17     ` Bruce Momjian <bruce@momjian.us>
  2022-07-14 16:09       ` Re: How to reference the type of lock in the documentation. Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Bruce Momjian @ 2022-07-08 15:17 UTC (permalink / raw)
  To: Masahiko Sawada <sawada.mshk@gmail.com>; +Cc: troy@frericks.us; pgsql-docs@lists.postgresql.org

On Fri, Jul  8, 2022 at 11:12:59AM +0900, Masahiko Sawada wrote:
> On Fri, Jul 8, 2022 at 10:21 AM Bruce Momjian <bruce@momjian.us> wrote:
> >
> > On Wed, Jun 29, 2022 at 08:45:11PM +0000, PG Doc comments form wrote:
> > > The following documentation comment has been logged on the website:
> > >
> > > Page: https://www.postgresql.org/docs/10/explicit-locking.html
> > > Description:
> > >
> > > On page https://www.postgresql.org/docs/10/explicit-locking.html, I'd like
> > > to suggest a search-engine-optimization improvement. Generally, but
> > > especially on this page, it'd be nice to have the lock name along with the
> > > user-friendly name. For example, with the first use of "SHARE UPDATE
> > > EXCLUSIVE", I'd like to see the lock name with it, for example, "SHARE
> > > UPDATE EXCLUSIVE (ShareUpdateExclusiveLock)".
> >
> > I see your point --- that the names that appear in the pg_locks view
> > don't appear in our documentation.  The attached patches adds the
> > pg_locks names after each lock name.  You can see the doc output here:
> >
> >         https://momjian.us/tmp/pgsql/explicit-locking.html
> >
> > If people like this, I can apply it to all supported branches.
> 
> +1

I wasn't happy with the '/' so I changed to using parentheses instead. 
Updated patch attached, same URL for updated output.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson

Attachments:

  [text/x-diff] lock.diff (2.6K, ../../YshKiZOs7hRaXXir@momjian.us/2-lock.diff)
  download | inline diff:
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
index ff148bb3dc..14b51db55e 100644
--- a/doc/src/sgml/mvcc.sgml
+++ b/doc/src/sgml/mvcc.sgml
@@ -907,7 +907,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
       <title>Table-Level Lock Modes</title>
       <varlistentry>
        <term>
-        <literal>ACCESS SHARE</literal>
+        <literal>ACCESS SHARE</literal> (<literal>AccessShareLock</literal>)
        </term>
        <listitem>
         <para>
@@ -925,7 +925,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>ROW SHARE</literal>
+        <literal>ROW SHARE</literal> (<literal>RowShareLock</literal>)
        </term>
        <listitem>
         <para>
@@ -948,7 +948,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>ROW EXCLUSIVE</literal>
+        <literal>ROW EXCLUSIVE</literal> (<literal>RowExclusiveLock</literal>)
        </term>
        <listitem>
         <para>
@@ -971,7 +971,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>SHARE UPDATE EXCLUSIVE</literal>
+        <literal>SHARE UPDATE EXCLUSIVE</literal> (<literal>ShareUpdateExclusiveLock</literal>)
        </term>
        <listitem>
         <para>
@@ -997,7 +997,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>SHARE</literal>
+        <literal>SHARE</literal> (<literal>ShareLock</literal>)
        </term>
        <listitem>
         <para>
@@ -1017,7 +1017,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>SHARE ROW EXCLUSIVE</literal>
+        <literal>SHARE ROW EXCLUSIVE</literal> (<literal>ShareRowExclusiveLock</literal>)
        </term>
        <listitem>
         <para>
@@ -1039,7 +1039,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>EXCLUSIVE</literal>
+        <literal>EXCLUSIVE</literal> (<literal>ExclusiveLock</literal>)
        </term>
        <listitem>
         <para>
@@ -1061,7 +1061,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
       <varlistentry>
        <term>
-        <literal>ACCESS EXCLUSIVE</literal>
+        <literal>ACCESS EXCLUSIVE</literal> (<literal>AccessExclusiveLock</literal>)
        </term>
        <listitem>
         <para>

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

* Re: How to reference the type of lock in the documentation.
  2022-06-29 20:45 How to reference the type of lock in the documentation. PG Doc comments form <noreply@postgresql.org>
  2022-07-08 01:20 ` Re: How to reference the type of lock in the documentation. Bruce Momjian <bruce@momjian.us>
  2022-07-08 02:12   ` Re: How to reference the type of lock in the documentation. Masahiko Sawada <sawada.mshk@gmail.com>
  2022-07-08 15:17     ` Re: How to reference the type of lock in the documentation. Bruce Momjian <bruce@momjian.us>
@ 2022-07-14 16:09       ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Bruce Momjian @ 2022-07-14 16:09 UTC (permalink / raw)
  To: Troy Frericks <troy.frericks@gmail.com>; +Cc: Masahiko Sawada <sawada.mshk@gmail.com>; troy@frericks.us; pgsql-docs@lists.postgresql.org

On Mon, Jul 11, 2022 at 06:50:30PM -0500, Troy Frericks wrote:
> 
> Looks awesome!

Patch applied to all supported versions --- thanks for your report.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson






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


end of thread, other threads:[~2022-07-14 16:09 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 20:45 How to reference the type of lock in the documentation. PG Doc comments form <noreply@postgresql.org>
2022-07-08 01:20 ` Bruce Momjian <bruce@momjian.us>
2022-07-08 02:12   ` Masahiko Sawada <sawada.mshk@gmail.com>
2022-07-08 15:17     ` Bruce Momjian <bruce@momjian.us>
2022-07-14 16:09       ` Bruce Momjian <bruce@momjian.us>

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