目录
pg_stat_activity
pg_stat_replication
pg_stat_replication_slots
pg_stat_wal_receiver
pg_stat_recovery_prefetch
pg_stat_subscription
pg_stat_subscription_stats
pg_stat_ssl
pg_stat_gssapi
pg_stat_archiver
pg_stat_io
pg_stat_bgwriter
pg_stat_checkpointer
pg_stat_wal
pg_stat_database
pg_stat_database_conflicts
pg_stat_all_tables
pg_stat_all_indexes
pg_statio_all_tables
pg_statio_all_indexes
pg_statio_all_sequences
pg_stat_user_functions
pg_stat_slru
数据库管理员常常想知道,“系统此刻正在做什么?”本章讨论如何找出答案。
有多种工具可用于监视数据库活动并分析性能。本章的大部分内容专门用于描述 PostgreSQL 的累积统计系统,但不要忽略 ps
、top
、iostat
和 vmstat
等常规 Unix 监视程序。此外,一旦确定查询性能不佳,就可能需要使用 PostgreSQL 的 EXPLAIN
命令进行进一步调查。14.1 节 讨论 EXPLAIN
和理解单个查询行为的其他方法。