Details
-
Improvement
-
Status: Open
-
Medium
-
Resolution: Unresolved
-
None
-
None
-
Yes
-
Yes
-
No
Description
Professional Services created a custom dashboard to monitor PostgreSQL bloat statistics. The query used is rather heavy, and can take up to 2 minutes to return a result. As such, this is not something that fits in neatly to the existing low, medium, high resolution options.
For this dashboard (and possibly other non-critical checks), we would like to have an option for a 1-hour resolution in addition to the existing choices (high, medium, low, extra-low).
The query being used is:
SELECT s.schemaname || '.' || s.relname relname, st.table_len table_size, st.dead_tuple_percent dead_percent FROM pg_statio_user_tables s , pgstattuple(s.schemaname ||'.'|| s.relname) AS st WHERE st.dead_tuple_percent > 0 ORDER BY dead_tuple_percent DESC
Note that pgstattuples is installed.