In Chapter 11, Deciding on Useful Extensions, we learned about some useful extensions that are widely adopted and that can give your deployment a real boost. Following this up, you will now be introduced to PostgreSQL troubleshooting. The idea is to give you a systematic approach to inspecting and fixing your system.
In this chapter, the following topics will be covered:
- Approaching an unknown database
- Inspecting pg_stat_activity
- Checking for slow queries
- Inspecting the log
- Checking for missing indexes
- Checking for memory and I/O
- Understanding noteworthy error scenarios
Keep in mind that many things can go wrong, so it is important to professionally monitor the database.