Find blocking chains
find_blocking_chainsFind database backends waiting on locks and the specific PIDs holding those locks, revealing blocking chains to troubleshoot concurrency issues.
Instructions
Return (blocked, blocking) backend pairs via pg_blocking_pids. Each row pairs a backend waiting on a Lock with one PID holding the lock that's preventing progress. Cycles are possible (A blocks B, B blocks A); render with care. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |