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-07-12T05:37:28Z
Lists: pgsql-hackers
On Wed, Jun 13, 2018 at 08:29:12PM +0000, Bossart, Nathan wrote:
> Previous thread: https://postgr.es/m/4BC0F3CD-F4B5-4F23-AADB-80607F9E4B4E%40amazon.com
> 
> This is a new thread for tracking the work to add SKIP LOCKED to
> VACUUM and ANALYZE.  I've attached a rebased set of patches.

I am beginning to look at this stuff, and committed patch 4 and 5 on the
way as they make sense independently.  I am still reviewing the rest,
which applies with some fuzz, and the tests proposed still pass.
--
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