pg_prepared_xacts — PostgreSQL system view

The PostgreSQL pg_prepared_xacts system view: full column reference (names, types, descriptions), catalog relationships and version support.

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):

  • transaction xid
    Numeric transaction identifier of the prepared transaction
  • gid text
    Global transaction identifier that was assigned to the transaction
  • prepared timestamptz
    Time at which the transaction was prepared for commit
  • owner name references pg_authid.rolname
    Name of the user that executed the transaction
  • database name references pg_database.datname
    Name of the database in which the transaction was executed

Related catalogs

This object references the following other system catalogs:

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.