On Sat, Dec 11, 2021 at 2:52 PM Andres Freund <and...@anarazel.de> wrote: > I feel one, or both, must be missing something here. My point was that you > said upthread that the patch doesn't change DEBUG2/non-verbose logging for > most messages. But the fact that those messages are only emitted inside and if > (verbose) seems to contradict that?
That is technically true, but it's not true in any practical sense. Yes, there are 2 distinct ereports() per vacuumlazy.c call for VACUUM VERBOSE (i.e. 2 per relation processed by the command). Yes, only the second one is actually "shared" with log_autovacuum_* (the first one is just shows that we're processing a new relation, with the aggressiveness). But that's not very significant. The only reason that I did it that way is because there is an expectation that plain "VACUUM VERBOSE" (i.e. no target relation specified) will work as a rudimentary progress indicator at the heap rel granularity -- the VACUUM VERBOSE docs pretty much say so. As I pointed out before, the docs for VERBOSE that appear in vacuum.sgml say: "When VERBOSE is specified, VACUUM emits progress messages to indicate which table is currently being processed. Various statistics about the tables are printed as well." Having 2 ereports (not just 1) isn't essential, but it seems useful because it makes the new VACUUM VERBOSE continue to work like this. But without any of the downsides that go with seeing way too much detail, moment to moment. -- Peter Geoghegan