On 6th of April 2020, Amit Kapila committed patch:
Allow autovacuum to log WAL usage statistics. This commit allows autovacuum to log WAL usage statistics added by commit df3b181499. Author: Julien Rouhaud Reviewed-by: Dilip Kumar and Amit Kapila Discussion: https://postgr.es/m/CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com
Description is pretty obvious, but let's see how it looks.
After enabling autovacuum logs by setting log_autovacuum_min_duration to 0, and triggering autovacuum, I saw in logs:
2020-04-17 14:57:28.762 CEST @ 243260 LOG: automatic vacuum of table "depesz.public.test": index scans: 1 pages: 0 removed, 648 remain, 0 skipped due to pins, 0 skipped frozen tuples: 51253 removed, 50162 remain, 0 are dead but not yet removable, oldest xmin: 5708 buffer usage: 2309 hits, 0 misses, 1 dirtied avg read rate: 0.000 MB/s, avg write rate: 0.105 MB/s system usage: CPU: user: 0.04 s, system: 0.00 s, elapsed: 0.07 s WAL usage: 2232 records, 1 full page writes, 441039 bytes
Which is pretty cool. Thanks to all involved.