8.14. Table Usage Metrics #
Metrics based on the pg_stat_all_tables, pg_statio_all_tables, and pg_tables views:
postgresql.tables.analyze_countpostgresql.tables.autoanalyze_countpostgresql.tables.autovacuum_countpostgresql.tables.heap_blocks_hitpostgresql.tables.heap_blocks_readpostgresql.tables.heap_size_bytespostgresql.tables.toast_heap_blocks_hitpostgresql.tables.index_blocks_readpostgresql.tables.index_scanpostgresql.tables.index_tuples_fetchpostgresql.tables.last_analyze_time_unixtimepostgresql.tables.last_autoanalyze_time_unixtimepostgresql.tables.last_autovacuum_time_unixtimepostgresql.tables.last_vacuum_time_unixtimepostgresql.tables.seq_scanpostgresql.tables.seq_tuples_fetchpostgresql.tables.size_bytespostgresql.tables.toast_heap_blocks_hitpostgresql.tables.toast_heap_blocks_readpostgresql.tables.toast_index_blocks_hitpostgresql.tables.toast_index_blocks_readpostgresql.tables.toast_size_bytespostgresql.tables.tuples_deadpostgresql.tables.tuples_deletedpostgresql.tables.tuples_hot_updatedpostgresql.tables.tuples_inserted_since_vacuumpostgresql.tables.tuples_insertedpostgresql.tables.tuples_livepostgresql.tables.tuples_modified_since_analyzepostgresql.tables.tuples_updatedpostgresql.tables.vacuum_count
Starting from Postgres Pro and PostgreSQL 18, the following additional metrics are available:
postgresql.tables.total_autoanalyze_time_millisecondspostgresql.tables.total_autovacuum_time_millisecondspostgresql.tables.total_analyze_time_millisecondspostgresql.tables.total_vacuum_time_milliseconds