# Chapter 28. Monitoring Database Activity
Table of Contents
28.2. The Statistics Collector
28.2.1. Statistics Collection Configuration
28.2.5. pg_stat_replication_slots
28.2.14. pg_stat_database_conflicts
28.2.18. pg_statio_all_indexes
28.2.19. pg_statio_all_sequences
28.2.20. pg_stat_user_functions
28.4.1. ANALYZE Progress Reporting
28.4.2. CREATE INDEX Progress Reporting
28.4.3. VACUUM Progress Reporting
28.4.4. CLUSTER Progress Reporting
28.4.5. Base Backup Progress Reporting
28.4.6. COPY Progress Reporting
28.5.1. Compiling for Dynamic Tracing
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 PostgreSQL'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 PostgreSQL's EXPLAIN
command. Section 14.1 discusses EXPLAIN
and other methods for understanding the behavior of an individual query.