Re: Improve behavior of concurrent ANALYZE/VACUUM - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Improve behavior of concurrent ANALYZE/VACUUM
Date
Msg-id 20180817064223.GH1693@paquier.xyz
Whole thread Raw
In response to Improve behavior of concurrent ANALYZE/VACUUM  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Improve behavior of concurrent ANALYZE/VACUUM
List pgsql-hackers
On Mon, Aug 13, 2018 at 12:21:42AM +0200, Michael Paquier wrote:
> The patch attached includes tests which I have used to also check that
> correct error messages are produced for VACUUM, VACUUM ANALYZE and
> ANALYZE.

I have reworked the patch on this side, clarifying the use of the new
common API for the logs.  One thing I am wondering about is what do we
want to do when VACUUM ANALYZE is used.  As of HEAD, if vacuum_rel()
stops, then analyze_rel() is never called, and the only log showing up
to a non-owner user would be:
skipping "foo" --- only superuser can vacuum it

With this patch, things become perhaps more confusing by generating two
WARNING log entries:
skipping "foo" --- only superuser can vacuum it
skipping "foo" --- only superuser can analyze it

We could either combine both in a single message, or just generate the
message for vacuum as HEAD does now.  I have also added some simple
regression tests triggering the skipping logs for shared catalogs,
non-shared catalogs and non-owners.  This could be a separate patch as
well.

Input is welcome.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: TupleTableSlot abstraction
Next
From: David Rowley
Date:
Subject: Re: FailedAssertion on partprune