You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As found by @gleu , the current implementation of last_maintenance uses pg_stat_user_tables which gets rid of pg_catalog and TOAST tables:
\sv+ pg_stat_user_tables
CREATE OR REPLACEVIEWpg_catalog.pg_stat_user_tables ASSELECTpg_stat_all_tables.relid,
…
FROM pg_stat_all_tables
WHERE (pg_stat_all_tables.schemaname<> ALL (ARRAY['pg_catalog'::name, 'information_schema'::name]))
ANDpg_stat_all_tables.schemaname !~ '^pg_toast'::text
So :
This is not an issue for last_analyze on TOAST tables, as they are never analyzed by themselves
We may miss a failing or missing VACUUM on TOAST tables (especially now that VACUUM can explicitly exclude them).
The VACUUM and ANALYZE on pg_catalog tables are not monitored, although they should, as they are a bit critical.
Suggestion : base the queries on pg_stat_all_tables, exclude only information_schema. For last_analyze, exclude pg_toast_% too.
As found by @gleu , the current implementation of
last_maintenance
usespg_stat_user_tables
which gets rid ofpg_catalog
and TOAST tables:So :
last_analyze
on TOAST tables, as they are never analyzed by themselvespg_catalog
tables are not monitored, although they should, as they are a bit critical.Suggestion : base the queries on
pg_stat_all_tables
, exclude onlyinformation_schema
. Forlast_analyze
, excludepg_toast_%
too.Could be made at the same time than #365
The text was updated successfully, but these errors were encountered: