public inbox for [email protected]  
help / color / mirror / Atom feed
From: Florin Irion <[email protected]>
To: Tom Lane <[email protected]>
To: Alvaro Herrera <[email protected]>
Cc: [email protected]
Subject: Re: pg_dump shared locks documentation
Date: Tue, 15 Mar 2022 23:21:41 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>



On 15/03/22 16:55, Tom Lane wrote:
> Alvaro Herrera <[email protected]> writes:
>> This might be a bit excessive to have in the main text.  What about
>> adding a footnote to point out the exact lock level that is meant, with
>> a link to the server doc page that explains each lock level?
> 
> I dunno how well <footnote> will render in man-page format.
> How about just inserting a parenthetical remark at the first usage?
> 
> ... leader process requests shared locks (ACCESS SHARE) on the ...
> 
> Possibly we could make the "ACCESS SHARE" be a <link> without causing
> problems in man format.
> 
> 			regards, tom lane

Makes sense.
I tried the footnote and in fact, it doesn't render well in the man page. It just adds a blank line(at least how I tried it).

So, I made the link to ACCESS SHARE, pointing to section 13.3.1. "Table-Level Locks" , was this what you had in mind? 

V2 attached. 

Thank you for looking into this.
Florin Irion
From 13c57e5218b605bd9d101e966b8edb486daac091 Mon Sep 17 00:00:00 2001
From: Florin Irion <[email protected]>
Date: Tue, 15 Mar 2022 22:43:34 +0100
Subject: [PATCH v2] Specify correctly the locks pg_dump takes

The pg_dump leader and worker processes take `AccessShareLock`s,
clarify it in the docs so that it can not be misunderstood with
`ShareLock`s.
---
 doc/src/sgml/ref/pg_dump.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 2f0042fd96..07edd459cf 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -372,8 +372,8 @@ PostgreSQL documentation
        <para>
         Requesting exclusive locks on database objects while running a parallel dump could
         cause the dump to fail. The reason is that the <application>pg_dump</application> leader process
-        requests shared locks on the objects that the worker processes are going to dump later
-        in order to
+        requests shared locks (<link linkend="locking-tables">ACCESS SHARE</link>) on the
+        objects that the worker processes are going to dump later in order to
         make sure that nobody deletes them and makes them go away while the dump is running.
         If another client then requests an exclusive lock on a table, that lock will not be
         granted but will be queued waiting for the shared lock of the leader process to be
-- 
2.34.0



Attachments:

  [text/plain] v2-0001-Specify-correctly-the-locks-pg_dump-takes.patch (1.4K, 2-v2-0001-Specify-correctly-the-locks-pg_dump-takes.patch)
  download | inline diff:
From 13c57e5218b605bd9d101e966b8edb486daac091 Mon Sep 17 00:00:00 2001
From: Florin Irion <[email protected]>
Date: Tue, 15 Mar 2022 22:43:34 +0100
Subject: [PATCH v2] Specify correctly the locks pg_dump takes

The pg_dump leader and worker processes take `AccessShareLock`s,
clarify it in the docs so that it can not be misunderstood with
`ShareLock`s.
---
 doc/src/sgml/ref/pg_dump.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 2f0042fd96..07edd459cf 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -372,8 +372,8 @@ PostgreSQL documentation
        <para>
         Requesting exclusive locks on database objects while running a parallel dump could
         cause the dump to fail. The reason is that the <application>pg_dump</application> leader process
-        requests shared locks on the objects that the worker processes are going to dump later
-        in order to
+        requests shared locks (<link linkend="locking-tables">ACCESS SHARE</link>) on the
+        objects that the worker processes are going to dump later in order to
         make sure that nobody deletes them and makes them go away while the dump is running.
         If another client then requests an exclusive lock on a table, that lock will not be
         granted but will be queued waiting for the shared lock of the leader process to be
-- 
2.34.0



reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pg_dump shared locks documentation
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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