Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Sergei Kornilov <sk(at)zsrv(dot)org>, nasbyj(at)amazon(dot)com, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru
Date: 2018-10-02 00:11:51
Message-ID: 20181002001151.GP11712@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2018-10-02 00:49:07 Re: pgsql: Add assertions that we hold some relevant lock during relation o
Previous Message Michael Paquier 2018-10-02 00:01:24 pgsql: Refactor relation opening for VACUUM and ANALYZE

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-10-02 00:19:16 Re: snprintf.c hammering memset()
Previous Message Michael Paquier 2018-10-02 00:06:33 Re: Add SKIP LOCKED to VACUUM and ANALYZE