Health check
pg_health_checkCheck whether a PostgreSQL database is healthy by running a quick DBA check-up that returns severity-ranked findings on connections, locks, wraparound, indexes, replication, and configuration.
Instructions
Run a quick DBA check-up and return findings ranked by severity: connection use, long transactions, sessions idle in transaction, blocked sessions, transaction id wraparound, dead rows, invalid and duplicate indexes, sequences near their end, cache hit ratio, forced checkpoints, inactive replication slots, tables never analyzed or without a primary key, deadlocks, temporary files, rollback ratio, settings waiting for a restart, autovacuum, fsync/full_page_writes and orphaned prepared transactions.
Start here when asked "is this database healthy?". Every finding has a severity
(critical, warning, info, ok), the measured value, the threshold used and the tool that
goes deeper. A check that cannot run on this server version or with this role is reported
as not_available and the others still run. It only reads statistics and catalogs.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_health_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No |