The page provides information about all transactions which are blocking other transactions.
In particular, we see the locks held by the blocking transaction, the locks requested by the blocked transaction, the queries in each transaction, and the initial text of each query, so it’s hopefully easy to figured out which queries are involved.
The query which generates this page will itself issue a number of locks, which will also be present in the output.
Name | Type |
---|---|
schema_id | int8 |
schema | varchar |
object:type | varchar |
object:id | int8 |
object:name | varchar |
blocking:user_id | int4 |
blocking:user | varchar |
blocking:pid | int4 |
blocking:xid | int8 |
blocking:lock type | varchar |
blocking:start | timestamp |
blocking:duration | interval |
blocking:texts | varchar |
blocked:user_id | int4 |
blocked:user | varchar |
blocked:pid | int4 |
blocked:xid | int8 |
blocked:lock type | varchar |
blocked:start | timestamp |
blocked:duration | interval |
blocked:texts | varchar |
The schema ID. This column is emitted in CSV exports only.
The schema name.
Set to table
or view
.
The ID of the contended object. This is column emitted in CSV exports only.
The name of the contended object.
The user ID of the owner of the blocking transaction. This is column emitted in CSV exports only.
The user name of the owner of the blocking transaction.
Blocking process process ID.
Blocking transaction ID.
Lock Type | Description |
---|---|
AccessExclusiveLock | Blocks AccessShareLock and ShareRowExclusiveLock locks |
AccessShareLock | Blocks AccessExclusiveLock locks |
ShareRowExclusiveLock | Blocks other ShareRowExclusiveLock locks |
Blocking transaction start timestamp.
Blocking transaction duration, in microseconds.
This field consists of the first 48 character of every query in the blocking transaction, separated by newlines, ordered from most recent to oldest.
Transactions hold and always hold all locks granted to them, and it is not possible to know from the system tables which queries caused which locks to be granted, so it is not possible to indicate which particular query took the lock which is blocking the blocked queries.
The user ID of the owner of the blocked transaction. This is column emitted in CSV exports only.
The user name of the owner of the blocked transaction.
Blocked process process ID.
Blocked transaction ID.
Lock Type | Description |
---|---|
AccessExclusiveLock | Blocks AccessShareLock and ShareRowExclusiveLock locks |
AccessShareLock | Blocks AccessExclusiveLock locks |
ShareRowExclusiveLock | Blocks other ShareRowExclusiveLock locks |
Blocked transition start timestamp.
Blocked transaction duration, in microseconds.
This field consists of the first 48 character of every query in the blocked transaction, separated by newlines, ordered from most recent to oldest.
The most recent query will be the particular query which has become blocked.