LOCKS

Monitors lock grants and requests for all nodes.

Monitors lock grants and requests for all nodes. If no locks are active, a query on LOCKS returns no rows.

Column Name Data Type Description
NODE_NAMES VARCHAR

Comma-separated list of nodes where lock interaction occurs.

A transaction can have the same lock in the same mode in the same scope on multiple nodes. However, the transaction gets only one line in the table.

OBJECT_NAME VARCHAR Name of object to lock, either a table or an internal structure: projection, global catalog, or local catalog.
OBJECT_ID INTEGER Unique numeric ID assigned by the Vertica catalog that identifies the object to lock.
TRANSACTION_ID VARCHAR Identifier of transaction within the session, if any; otherwise NULL. Transaction IDs can be used to join other system tables.
TRANSACTION_DESCRIPTION VARCHAR Identifier of transaction and associated description. Typically, this query caused the transaction's creation.
LOCK_MODE VARCHAR Transaction's lock type.
LOCK_SCOPE VARCHAR

Expected duration of the lock after it is granted. Before the lock is granted, Vertica lists the scope as REQUESTED.

After a lock is granted, its scope is set to one of the following:

  • STATEMENT_LOCALPLAN

  • STATEMENT_COMPILE

  • STATEMENT_EXECUTE

  • TRANSACTION_POSTCOMMIT

  • TRANSACTION

All scopes other than TRANSACTION are transient and used only as part of normal query processing.

REQUEST_TIMESTAMP TIMESTAMP Time when the transaction began waiting on the lock.
GRANT_TIMESTAMP TIMESTAMP

Time the transaction acquired or upgraded the lock:

  • Return values are NULL until the grant occurs.

  • If the grant occurs immediately, values might be the same as REQUEST_TIMESTAMP.

See also