Vacuum and wraparound status
pg_vacuum_statusReport vacuum and autovacuum state—configuration, dead-row thresholds, transaction ID age, xmin blockers, running vacuums, and workers—to diagnose bloat, idle autovacuum, or wraparound risk.
Instructions
Report the state of vacuum and autovacuum: its configuration, the tables with the most dead rows measured against their autovacuum threshold (honouring per-table reloptions), transaction id and multixact age per table and per database as a percentage of the wraparound limit, what holds back the oldest xmin (sessions, prepared transactions, replication slots), vacuums running now with their progress, and the autovacuum workers.
Use it when tables bloat, autovacuum seems idle, or before a wraparound emergency.
limit caps each list. For the per-table ranking by activity use pg_table_stats.
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_vacuum_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| connection | No |