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

Nasby, Jim <nasbyj@amazon.com>

From: "Nasby, Jim" <nasbyj@amazon.com>
To: Andres Freund <andres@anarazel.de>
Cc: Sergei Kornilov <sk@zsrv.org>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-09-24T19:53:48Z
Lists: pgsql-hackers
> On Sep 24, 2018, at 1:29 PM, Andres Freund <andres@anarazel.de> wrote:
> 
> I'm very doubtful this is an improvement. Especially with the upcoming
> pluggable storage work making vacuumlazy.c heap specific, while vacuum.c
> stays generic.  The concept of something like
> PROC_VACUUM_FOR_WRAPAROUND, should imo not be pushed down that much
> (even if criteria for it might).

That’s already a problem since vacuum logging is spread all over while autovac logging is not. Perhaps there needs to be some sort of vacuum_log() function that immediately provides output for manual vacuums, but aggregates output for autovac. AFAIK that’s the only real reason for autovac logging being a special case today.

Commits

  1. Skip redundant anti-wraparound vacuums

  2. Improve autovacuum logging for aggressive and anti-wraparound runs

  3. In relevant log messages, indicate whether vacuums are aggressive.

  4. Don't vacuum all-frozen pages.