PG_LOCKS
PG_LOCKS displays information about the locks held by open transactions.
Name |
Type |
Reference |
Description |
---|---|---|---|
locktype |
text |
N/A |
Type of the locked object: relation, extend, page, tuple, transactionid, virtualxid, object, userlock, and advisory |
database |
oid |
PG_DATABASE.oid |
OID of the database in which the locked target exists
|
relation |
oid |
PG_CLASS.oid |
OID of the relationship targeted by the lock. The value is NULL if the object is neither a relationship nor part of a relationship. |
page |
integer |
N/A |
Page number targeted by the lock within the relationship. If the object is neither a relation page nor row page, the value is NULL. |
tuple |
smallint |
N/A |
Row number targeted by the lock within the page. If the object is not a row, the value is NULL. |
virtualxid |
text |
N/A |
Virtual ID of the transaction targeted by the lock. If the object is not a virtual transaction ID, the value is NULL. |
transactionid |
xid |
N/A |
ID of the transaction targeted by the lock. If the object is not a transaction ID, the value is NULL. |
classid |
oid |
PG_CLASS.oid |
OID of the system table that contains the object. If the object is not a general database object, the value is NULL. |
objid |
oid |
N/A |
OID of the lock target within its system table. If the target is not a general database object, the value is NULL. |
objsubid |
smallint |
N/A |
Column number for a column in the table. The value is 0 if the target is some other object type. If the object is not a general database object, the value is NULL. |
virtualtransaction |
text |
N/A |
Virtual ID of the transaction holding or awaiting this lock |
pid |
bigint |
N/A |
Logical ID of the server thread holding or awaiting this lock. This is NULL if the lock is held by a prepared transaction. |
mode |
text |
N/A |
Lock mode held or desired by this thread For more information about lock modes, see LOCK. |
granted |
boolean |
N/A |
|
fastpath |
boolean |
N/A |
Whether the lock is obtained through fast-path (true) or main lock table (false) |
waittime |
timestamp with time zone |
N/A |
Timestamp when the lock wait starts. This column is available only in clusters of version 9.1.0.200 or later. |
holdtime |
timestamp with time zone |
N/A |
Timestamp when the lock starts to be held. This column is available only in clusters of version 9.1.0.200 or later. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot