Read PG stat lock
read_pg_stat_lockRead per-lock-type acquire, wait, and wait-time counters from PostgreSQL 19's pg_stat_lock view to diagnose lock contention and track activity since the last statistics reset.
Instructions
Return every row from PG 19's pg_stat_lock view (per-lock-type acquire / wait / wait-time counters since the most recent pg_stat_reset). Empty list on PG < 19 or when the view isn't present. Returns a list of objects with lock_type (relation / page / tuple / xid / virtualxid / advisory / ...), acquires, waits, and wait_time_us.
Example: read_pg_stat_lock()
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": "read_pg_stat_lock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |