8

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 ...

Get PostgreSQL 16 Administration Cookbook 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.