RE: Required locks for ANALYZE

From: Aramaki Zyake <zyake(dot)mk4(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: RE: Required locks for ANALYZE
Date: 2019-09-30 07:46:56
Message-ID: 5d91b2f1.1c69fb81.bf75c.2036@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi,
I’m terribly sorry for the delay of response.

>This does not really seem like an improvement. The second formulation is
>pedantically correct, but also unintelligible.
>
> Maybe we could make it say "run in parallel with non-DDL activity" ?

I completely agree with you, therefore, I amended it as follows.
----
ANALYZE requires only a read lock on the target table, so it can run in
parallel with non-DDL activity on the table.
----

Would it be possible to proceed further?

Best regards

From: Tom Lane
Sent: Tuesday, August 20, 2019 11:12 PM
To: zyake(dot)mk4(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Required locks for ANALYZE

PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> Therefore, in my opinion, the below paragraph should be amended as below.

> * Before
> -----
> ANALYZE requires only a read lock on the target table, so it can run in
> parallel with other activity on the table.
> -----

> * After
> -----
> ANALYZE requires only a SHARE UPDATE EXCLUSIVE lock on the target table, so
> it can run in parallel with queries requiring ACCESS SHARE/ROW SHARE/ROW
> EXCLUSIVE locks such as SELECT, UPDATE, DELETE, INSERT on the table.
> -----

This does not really seem like an improvement. The second formulation is
pedantically correct, but also unintelligible.

Maybe we could make it say "run in parallel with non-DDL activity" ?

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Anders Åstrand 2019-09-30 09:18:46 Re: Do not use C++ style comments (// comments). Strict ANSI C compilers do not accept them.
Previous Message PG Doc comments form 2019-09-30 04:11:47 Chapter 43.8. "Transaction Management" fails to state two critical restrictions