Table of Contents
pg_stat_activity
pg_stat_replication
pg_stat_wal_receiver
pg_stat_subscription
pg_stat_ssl
pg_stat_archiver
pg_stat_bgwriter
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
A database administrator frequently wonders, “What is the system doing right now?” This chapter discusses how to find that out.
Several tools are available for monitoring database activity and
analyzing performance. Most of this chapter is devoted to describing
LightDB's statistics collector,
but one should not neglect regular Unix monitoring programs such as
ps
, top
, iostat
, and vmstat
.
Also, once one has identified a
poorly-performing query, further investigation might be needed using
LightDB's EXPLAIN command.
Section 15.1 discusses EXPLAIN
and other methods for understanding the behavior of an individual
query.