Blocked processes
When a process must wait to acquire a lock, it is a waiter. The other process that already has the lock (and is causing the waiter to wait) is a blocker.
This collection contains rows for both the blocker processes and the waiter processes in the database. If the row is a blocker process, then BLOCKERSPID = 0. If the row is a waiter process, then the BLOCKER column has information about its immediate blocker.
Waiters being blocked by a blocker can themselves also block other waiters, potentially forming a blocktree involving many processes. Thus, a row can be a waiter and a blocker, in some cases (and can involve different locks).
(spid)
| Name | Data Type | Description |
|---|---|---|
| spid | long | Session ID |
| kpid | long | Thread ID |
| blocker | long | Blocker session process ID (SPID); 0 = the row is a blocker process |
| time_blocked | long | Duration of time blocked, in seconds |
| username | string(32) | Login name |
| Attributes: | None |
|---|---|
| Minimum database version: | 8.0 |