Details
-
Technical task
-
Status: Done
-
Medium
-
Resolution: Duplicate
-
2.17.0
-
None
-
None
-
[obsolete] C/S Core
Description
QAN already collects some data from Postgres extensions pg_stat_statements/pg_stat_monitor like "Shared Blocks Written", "Shared Blocks Read" etc.
Full list of currently gathered/presented columns in QAN and their pg_stat_statement/monitor names:
- Rows Sent (rows)
- Shared Blocks Written (shared_blks_written)
- Shared Blocks Read (shared_blks_read)
- Shared Block Cache Hits (shared_blks_hit)
- Shared Blocks Dirtied (shared_blks_dirtied)
- User CPU time (cpu_user_time *from pg_stat_monitor)
- System CPU time (cpu_sys_time *from pg_stat_monitor)
- Writing Blocks Time (blk_write_time)
- Reading Blocks Time (blk_read_time)
pg_stat_statements and pg_stat_monitor, however, provide many more metrics that could be useful. In particular, in PG 13 the planning time was separated into a separate metric, and WAL write information was added. pg_stat_monitor also has that, but additionally also shows the number of plans for the particular statement.
In general, ideally, we want to see every column of pg_stat_statements/monitor in QAN. With some columns, however, that will require a version-specific code. Perhaps, min/max/mean/stddev time distribution columns are redundant in QAN, though see https://jira.percona.com/browse/PMM-8057 for where that can be useful potentially.