show "aggressive" or not in autovacuum logs
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: pgsql-hackers@postgresql.org
Date: 2017-03-29T03:46:49Z
Lists: pgsql-hackers
Attachments
- show_aggressive_in_autovacuum_logs_1.patch (text/x-patch) patch
Hello, it would be too late but I'd like to propose this because this cannot be back-patched. In autovacuum logs, "%u skipped frozen" shows the number of pages skipped by ALL_FROZEN only in aggressive vacuum. So users cannot tell whether '0 skipped-frozen' means a non-agressive vacuum or no frozen-pages in an agressive vacuum. I think it is nice to have an indication whether the scan was "agressive" or not in log output. Like this, > LOG: automatic aggressive vacuum of table "template1.pg_catalog.pg_statistic": index scans: 0 "0 skipped frozen" is uesless in non-aggressive vacuum but removing it would be too-much. Inserting "aggressive" reduces machine-readability so it might be better in another place. The attached patch does the following. > LOG: automatic vacuum of table "postgres.public.pgbench_branches": mode: normal, index scans: 0 > LOG: automatic vacuum of table "postgres.public.pgbench_branches": mode: aggressive, index scans: 0 regards, -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
In relevant log messages, indicate whether vacuums are aggressive.
- b55509332f50 11.0 landed