I committed 0001-0003. Here is a new version of the last two patches.
Some notes:
* Instead of renaming recheck_relation_needs_vacanalyze(), I followed
Álvaro's suggestion to remove that function and instead fetch the stats
within relation_needs_vacanalyze() itself.
* Per your feedback, I renamed the view back to pg_stat_autovacuum_scores.
* Instead of limiting the view to pg_read_all_stats, I've left it
accessible to all users. AFAICT there's nothing sensitive here.
* I reworked the column descriptions a bit to make it clear that values >=
1.0 mean autovacuum will process it (except if autovacuum is disabled).
WDYT?
--
nathan