Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Sergei Kornilov <sk@zsrv.org>, nasbyj@amazon.com, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-10-02T00:11:51Z
Lists: pgsql-hackers
On Fri, Sep 28, 2018 at 01:53:14PM +0900, Masahiko Sawada wrote:
> I agree. Can we fix this simply by the attached patch?
Thanks for sending a patch.
+ /* autovacuum cannot be anti-wraparound and not aggressive vacuum */
+ Assert(aggressive);
+ msgfmt = _("automatic aggressive vacuum to prevent wraparound of table \"%s.%s.%s\": index scans: %d\n");
While adding this comment in lazy_vacuum_rel() is adapted, I think that
we ought to make the assertion check more aggressive by not having it
depend on if log_min_duration is set or not. So why not moving that to
a place a bit higher, where aggressive gets defined?
--
Michael
Commits
-
Skip redundant anti-wraparound vacuums
- 2aa6e331ead7 12.0 landed
-
Improve autovacuum logging for aggressive and anti-wraparound runs
- 28a8fa984c63 12.0 cited
-
In relevant log messages, indicate whether vacuums are aggressive.
- b55509332f50 11.0 cited
-
Don't vacuum all-frozen pages.
- fd31cd265138 9.6.0 cited