pgbot

An open source command-line tool (Go, Apache 2.0 licence) that examines a PostgreSQL database without ever writing to it: it connects through a monitoring role that has no write grants. In one pass it shows you slow and regressing queries, growing tables, unused or missing indexes, locks, cache hit ratio and vacuum activity, and it even reads the server log over SQL. It can also run as an MCP server, so an agent like Claude Code can query it read-only.

Strengths

Limitations

Best for

Official site

View on Coeurdar