I'm looking into issues with our autovacuum settings and trying to understand last_autoanalyze and last_autovacuum from the pg_stat_all_tables.
I understand autovacuum to work in an incremental way, compacting and cleaning up dead tuples in batches, then sleeping for a moment, etc. So what does last_autovacuum mean? Is it possible that autovacuum could be mostly working but that that timestamp might never get updated (e.g. because a tuple could not be removed)?
Many of the timestamps I see for our tables are old, even though I'm fairly sure I observed a running autovacuum thread on some of the tables.
EDIT:
If I'm unclear, my question is: does last_autovacuum mean...
- the time at which an incremental autovacuum process last finished up a chunk of work on this table and slept
- the time an autovacuum process worked its way to the very end of a table
- the above, but only if there were no tuples that could not be removed
- something else