Hello, I’m DocuDroid!
Submitting feedback
Thank you for rating our AI Search!
We would be grateful if you could share your thoughts so we can improve our AI Search for you and other readers.
GitHub

gp_locks_on_relation

The gp_toolkit.gp_locks_on_relation view shows locks currently being held on a relation, and associated session information about the query. This view is accessible to all users. However, non‑superusers will only be able to see the locks for relations that they have permission to access.

Column Description

lorlocktype

Type of the lockable object: relation, extend, page, tuple, transactionid, object, userlock, resource queue, or advisory

lordatabase

Object ID of the database in which the object exists; 0 if the object is a shared object

lorrelname

The name of the relation

lorrelation

The object ID of the relation

lortransaction

The transaction ID that is affected by the lock

lorpid

Process ID of the server process holding or awaiting this lock. NULL if the lock is held by a prepared transaction

lormode

Name of the lock mode held or desired by this process

lorgranted

Displays whether the lock is granted (true) or not granted (false)

lorcurrentquery

The current query in the session