Summary
The view pg_prepared_xacts displays information about transactions that are currently prepared for two-phase commit (see prepare_transaction for details).
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_prepared_xacts system view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
transactionxid
Numeric transaction identifier of the prepared transactiongidtext
Global transaction identifier that was assigned to the transactionpreparedtimestamptz
Time at which the transaction was prepared for commitownernamereferencespg_authid.rolname
Name of the user that executed the transactiondatabasenamereferencespg_database.datname
Name of the database in which the transaction was executed
Related catalogs
This object references the following other system catalogs:
owner→pg_authiddatabase→pg_database
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_prepared_xacts.