See https://www.datadoghq.com/blog/postgresql-vacuum-monitoring/ Query: SELECT relname, last_vacuum, last_autovacuum FROM pg_stat_user_tables;