Re: Required locks for ANALYZE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zyake(dot)mk4(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Required locks for ANALYZE
Date: 2019-08-20 14:12:24
Message-ID: 6129.1566310344@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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 Joshua D. Drake 2019-08-20 16:03:09 Re: readability changes to postgres.sgml
Previous Message PG Doc comments form 2019-08-20 12:03:26 Server Configuration: Replication documentation