Book Image

Troubleshooting PostgreSQL

Book Image

Troubleshooting PostgreSQL

Overview of this book

Table of Contents (17 chapters)
Troubleshooting PostgreSQL
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Detecting I/O bottlenecks


The track_io_timing command can give you clues about the database that is causing most of the load. However, there is more; pg_stat_bgwriter contains a lot of information about the system's I/O behavior:

test=# \d pg_stat_bgwriter  
              View "pg_catalog.pg_stat_bgwriter"
        Column         |           Type           |
-----------------------+--------------------------+
 checkpoints_timed     | bigint                   | 
 checkpoints_req       | bigint                   | 
 checkpoint_write_time | double precision         | 
 checkpoint_sync_time  | double precision         | 
 buffers_checkpoint    | bigint                   | 
 buffers_clean         | bigint                   | 
 maxwritten_clean      | bigint                   | 
 buffers_backend       | bigint                   | 
 buffers_backend_fsync | bigint                   | 
 buffers_alloc         | bigint                   | 
 stats_reset           | timestamp with time zone | 

Understanding...