Troubleshooting

In this chapter, we will learn several techniques to track sources of poor performance or stop potential outages before they occur. We will cover the following recipes in this chapter:

  • Performing triage
  • Installing common statistics packages
  • Evaluating the current disk performance with iostat
  • Tracking I/O-heavy processes with iotop
  • Viewing past performance with sar
  • Correlating performance with dstat
  • Interpreting /proc/meminfo
  • Examining /proc/net/bonding/bond0
  • Checking the pg_stat_activity view
  • Checking the pg_stat_statements view
  • Deciphering database locks
  • Debugging with strace
  • Logging checkpoints properly

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.