Updated on 2024-05-07 GMT+08:00

PG_RUNNING_XACTS

PG_RUNNING_XACTS displays information about running transactions on the current node.

Table 1 PG_RUNNING_XACTS columns

Name

Type

Description

handle

integer

Slot handle in the transaction manager corresponding to a transaction. The value is fixed at –1.

gxid

xid

Transaction ID

state

tinyint

Transaction status.

  • 3: prepared.
  • 0: starting.

node

text

Node name.

xmin

xid

Minimum transaction ID on the node.

vacuum

boolean

Specifies whether the current transaction is lazy vacuum.

  • t (true): yes.
  • f (false): no.

timeline

bigint

Number of database restart times.

prepare_xid

xid

ID of the transaction in the prepared state; otherwise, the value is 0.

pid

bigint

Thread ID corresponding to the transaction

next_xid

xid

Transaction ID sent from a CN to a DN.