get_per_backend_io_stats
Analyzes PostgreSQL 18+ per-backend I/O and WAL statistics to identify processes generating the most I/O and diagnose process-level hotspots.
Instructions
[Tool Purpose]: Analyze per-backend I/O and WAL statistics (PostgreSQL 18+)
Note: Uses pg_stat_get_backend_io() and pg_stat_get_backend_wal() which are new in PG 18.
[Exact Functionality]:
Show I/O statistics broken down by individual backend process
Display per-backend WAL generation statistics
Identify backends with highest I/O activity
Falls back to version notice on PG < 18
[Required Use Cases]:
When user requests "per-backend I/O", "backend I/O stats", "which backend is doing most I/O"
When diagnosing I/O hotspots at the process level
When analyzing per-connection I/O patterns
[Strictly Prohibited Use Cases]:
Requests for backend termination
Requests for I/O configuration changes
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": "get_per_backend_io_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results (1-100, default 20) | |
| database_name | No | Database name (uses default if omitted) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |