Troubleshooting PostgreSQL
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. By way of a follow-up, you will now be introduced to PostgreSQL troubleshooting. The idea is to give you a systematic approach to inspecting and fixing your system to improve its performance and avoid common pitfalls. Having a systematic approach definitely pays off. Many users face similar issues, so it makes sense to take a look at the most common problems haunting people all over the world.
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 in the database, so it is important to professionally monitor it. To figure...