Re: Add SKIP LOCKED to VACUUM and ANALYZE

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: "Bossart, Nathan" <bossartn@amazon.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Andres Freund <andres@anarazel.de>, Masahiko Sawada <sawada.mshk@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Lyes Ameddah <lyes.amd@gmail.com>
Date: 2018-10-04T00:09:11Z
Lists: pgsql-hackers
On Wed, Oct 03, 2018 at 04:20:42PM +0000, Bossart, Nathan wrote:
> Here is what I have so far for the docs:
>
> [snip]

Thanks, I have committed the patch, after minor tweaks to the docs.
Mainly, in the VACUUM page, I have added a mention that VACUUM ANALYZE
can block for row sampling.  I have also removed for now the set of
recommendations the patch added, as we still gather statistics on the
partitioned tables from the row samples gathered from the partitions, so
recommending to list only the leaves is not completely correct either
all the time.

We could perhaps add something about such recommendations.  A separate
section covering more general things may be interesting.
--
Michael

Commits

  1. Add option SKIP_LOCKED to VACUUM and ANALYZE

  2. Refactor relation opening for VACUUM and ANALYZE

  3. Refactor cluster_rel() to handle more options

  4. Add assertion in expand_vacuum_rel() for non-autovacuum path