Re: a verbose option for autovacuum
Tommy Li <tommy@coffeemeetsbagel.com>
From: Tommy Li <tommy@coffeemeetsbagel.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-02-02T00:59:35Z
Lists: pgsql-hackers
Hi Masahiko > If we set > it per-table basis, it’s useful when the user already knows which > tables are likely to take a long time for autovacuum I would assume that's the default case, most apps I've seen are designed around a small number of large tables that take up most of the maintenance effort > Regarding when to log, we can have autovacuum emit index vacuum log > after each lazy_vacuum/cleanup_index() end like VACUUM VERBOSE does, > but I’m not sure how it could work together with > log_autovacuum_min_duration. I do like having this rolled into the existing configuration. This might be an absurd idea, but what if the autovacuum process accumulates the per-index vacuum information until that threshold is reached, and then spits out the logs all at once? And after the min duration is passed, it just logs the rest of the index vacuum information as they occur. That way the information is more likely to be available to investigate an abnormally long running vacuum while it's still happening. Tommy
Commits
-
Add per-index stats information in verbose logs of autovacuum
- 5aed6a1fc214 14.0 landed
-
VACUUM ANALYZE: Always update pg_class.reltuples.
- 5f8727f5a679 14.0 cited