Updated on 2022-06-11 GMT+08:00

PGXC_DEADLOCK

PGXC_DEADLOCK displays lock wait information generated due to distributed deadlocks.

Currently, PGXC_DEADLOCK collects only lock wait information about locks whose locktype is relation, partition, page, tuple, or transactionid.

Table 1 PGXC_DEADLOCK columns

Name

Type

Description

locktype

text

Type of the locked object

nodename

name

Name of the node where the locked object resides

dbname

name

Name of the database where the locked object resides. The value is NULL if the locked object is a transaction.

nspname

name

Name of the namespace of the locked object

relname

name

Name of the relation targeted by the lock. The value is NULL if the object is not a relation or part of a relation.

partname

name

Name of the partition targeted by the lock. The value is NULL if the locked object is not a partition.

page

integer

Number of the page targeted by the lock. The value is NULL if the locked object is neither a page nor a tuple.

tuple

smallint

Number of the tuple targeted by the lock. The value is NULL if the locked object is not a tuple.

transactionid

xid

ID of the transaction targeted by the lock. The value is NULL if the locked object is not a transaction.

waitusername

name

Name of the user who waits for the lock

waitgxid

xid

ID of the transaction that waits for the lock

waitxactstart

timestamp with time zone

Start time of the transaction that waits for the lock

waitqueryid

bigint

Latest query ID of the thread that waits for the lock

waitquery

text

Latest query statement of the thread that waits for the lock

waitpid

bigint

ID of the thread that waits for the lock

waitmode

text

Mode of the waited lock

holdusername

name

Name of the user who holds the lock

holdgxid

xid

ID of the transaction that holds the lock

holdxactstart

timestamp with time zone

Start time of the transaction that holds the lock

holdqueryid

bigint

Latest query ID of the thread that holds the lock

holdquery

text

Latest query statement of the thread that holds the lock

holdpid

bigint

ID of the thread that holds the lock

holdmode

text

Mode of the held lock