On 15/03/22 16:55, Tom Lane wrote:
> Alvaro Herrera <alvhe...@alvh.no-ip.org> 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 <florin.ir...@enterprisedb.com>
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 via email to