The page provides information on all transactions which are holding and/or requesting locks, and the locks they hold and/or are requesting, where those locks are in the current database.
Where this page is for the current database, it will also show locks on system tables, and as such the query which generates this page where it issues a number of locks, will always have some rows present in the output.
Name | Type |
---|---|
object:schema_id | int8 |
object:schema | varchar |
object:type | varchar |
object:id | int8 |
object:name | varchar |
owner_user_id | int4 |
owner | varchar |
transaction:pid | int4 |
transaction:xid | int8 |
transaction:start | timestamp |
transaction:duration | interval |
lock:type | varchar |
lock:state | varchar |
The schema ID. This column is emitted in CSV exports only.
The schema name.
Set to table
or view
.
The ID of the locked object. This is column emitted in CSV exports only.
The name of the locked object.
The owner user ID. This column is emitted in CSV exports only.
The owner user name.
The process ID.
When a user connects to the cluster, a process is spawned, which accepts that connection. That’s the process the ID is for. That process is also the process which issues queries, and when you need to cancel a query, you in fact cancel the process, which by being cancelled, inherently also cancels the query it is running.
The transaction ID.
Transaction start timestamp.
Transaction duration.
Note this is an interval, not an int4.
Lock Type | Description |
---|---|
AccessExclusiveLock | Blocks AccessShareLock and ShareRowExclusiveLock locks |
AccessShareLock | Blocks AccessExclusiveLock locks |
ShareRowExclusiveLock | Blocks other ShareRowExclusiveLock locks |
Set to held
or pending
.