Read PG WAL stats
read_pg_wal_statsReads Write-Ahead Log (WAL) record statistics for a specified LSN range, grouped by resource manager or record type; requires pg_walinspect and reports when unavailable.
Instructions
Read Write-Ahead Log (WAL) record statistics over a specified LSN range, grouped by resource manager or record type. Requires the pg_walinspect extension. If not installed, returns available=false.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"start_lsn": "<start_lsn>"
},
"name": "read_pg_wal_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_lsn | No | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| start_lsn | Yes | ||
| per_record | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stats | Yes | ||
| available | Yes |