Re: Add SKIP LOCKED to VACUUM and ANALYZE - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add SKIP LOCKED to VACUUM and ANALYZE
Date
Msg-id 20180903231946.GD1343@paquier.xyz
Whole thread Raw
In response to Re: Add SKIP LOCKED to VACUUM and ANALYZE  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: Add SKIP LOCKED to VACUUM and ANALYZE  ("Bossart, Nathan" <bossartn@amazon.com>)
List pgsql-hackers
On Sun, Jul 29, 2018 at 10:56:24PM +0000, Bossart, Nathan wrote:
> Since vacuum_rel() already obtains an AccessExclusiveLock on the
> relation for VACUUM FULL, we might be able to skip altering
> cluster_rel().  I think we will need to alter it if we are going to
> add SKIP LOCKED to CLUSTER, though.

Nathan, could you rebase your patch set?  From what I can see the last
patch set applies with one conflict, and it would be nice for clarity to
split the routines for analyze, vacuum and cluster into separate places.
Similar to what is done with vacuum_is_relation_owner, having the same
set of logs for vacuum and analyze may be cleaner.  The set of ownership
checks should happen after the skip lock checks to be consistent between
the ownership checks done when building the relation list (list
expansion for partitions and such) as well as for vacuum_rel() and
analyze_rel().

With all the work which has been done already, I don't think that we are
that far from getting something committable.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Caching query plan costs
Next
From: Michael Paquier
Date:
Subject: Re: Loaded footgun open_datasync on Windows