From: Bruce Momjian <bruce@momjian.us>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: troy@frericks.us
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: How to reference the type of lock in the documentation.
Date: Fri, 8 Jul 2022 11:17:29 -0400
Message-ID: <YshKiZOs7hRaXXir@momjian.us> (raw)
In-Reply-To: <CAD21AoATecBK0=bRnLfGaptvPPk7sg1QkWLdyJcstU77feRnXw@mail.gmail.com>
References: <165653551130.665.8240515669521441325@wrigleys.postgresql.org>
<YseGd7IEIK3i7Fw3@momjian.us>
<CAD21AoATecBK0=bRnLfGaptvPPk7sg1QkWLdyJcstU77feRnXw@mail.gmail.com>
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.sgmlindex 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>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, sawada.mshk@gmail.com, troy@frericks.us, pgsql-docs@lists.postgresql.org
Subject: Re: How to reference the type of lock in the documentation.
In-Reply-To: <YshKiZOs7hRaXXir@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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