Monitoring and Diagnosis
In this chapter, you will find recipes for some common monitoring and diagnosis actions that you will want to perform inside your database. They are meant to answer specific questions that you often face when using PostgreSQL.
In this chapter, we will cover the following recipes:
- Providing PostgreSQL information to monitoring tools
- Monitoring the PostgreSQL message log
- Real-time viewing using pgAdmin
- Checking whether a user is connected
- Checking whether a computer is connected
- Repeatedly executing a query in psql
- Checking which queries are running
- Monitoring the progress of commands and queries
- Checking which queries are active or blocked
- Knowing who is blocking a query
- Killing a specific session
- Knowing whether anybody is using a specific table
- Knowing when a table was last used
- Monitoring I/O statistics
- Usage of disk space by temporary data
- Understanding...