pg_prepared_xacts

A system catalogue view providing information about transactions currently prepared for two-phase commit

pg_prepared_xacts is a system catalogue view providing information about transactions currently prepared for two-phase commit.

pg_prepared_xacts was added in PostgreSQL 8.1 (commit d0a89683).

Definition by PostgreSQL version

pg_prepared_xacts (PostgreSQL 13)

                   View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Collation | Nullable | Default
-------------+--------------------------+-----------+----------+---------
 transaction | xid                      |           |          |
 gid         | text                     |           |          |
 prepared    | timestamp with time zone |           |          |
 owner       | name                     |           |          |
 database    | name                     |           |          |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 12)

                   View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Collation | Nullable | Default
-------------+--------------------------+-----------+----------+---------
 transaction | xid                      |           |          |
 gid         | text                     |           |          |
 prepared    | timestamp with time zone |           |          |
 owner       | name                     |           |          |
 database    | name                     |           |          |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 11)

                   View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Collation | Nullable | Default
-------------+--------------------------+-----------+----------+---------
 transaction | xid                      |           |          |
 gid         | text                     |           |          |
 prepared    | timestamp with time zone |           |          |
 owner       | name                     |           |          |
 database    | name                     |           |          |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 10)

                   View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Collation | Nullable | Default
-------------+--------------------------+-----------+----------+---------
 transaction | xid                      |           |          |
 gid         | text                     |           |          |
 prepared    | timestamp with time zone |           |          |
 owner       | name                     |           |          |
 database    | name                     |           |          |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 9.6)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 9.5)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 9.4)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 9.3)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 9.2)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 9.1)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 9.0)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 8.4)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
View definition:
 SELECT p.transaction, p.gid, p.prepared, u.rolname AS owner, d.datname AS database
   FROM pg_prepared_xact() p(transaction, gid, prepared, ownerid, dbid)
   LEFT JOIN pg_authid u ON p.ownerid = u.oid
   LEFT JOIN pg_database d ON p.dbid = d.oid;
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 8.3)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
View definition:
 SELECT p.transaction, p.gid, p.prepared, u.rolname AS owner, d.datname AS database
   FROM pg_prepared_xact() p(transaction xid, gid text, prepared timestamp with time zone, ownerid oid, dbid oid)
   LEFT JOIN pg_authid u ON p.ownerid = u.oid
   LEFT JOIN pg_database d ON p.dbid = d.oid;
    

Documentation: pg_prepared_xacts

pg_prepared_xacts (PostgreSQL 8.2)

        View "pg_catalog.pg_prepared_xacts"
   Column    |           Type           | Modifiers
-------------+--------------------------+-----------
 transaction | xid                      |
 gid         | text                     |
 prepared    | timestamp with time zone |
 owner       | name                     |
 database    | name                     |
View definition:
 SELECT p."transaction", p.gid, p."prepared", u.rolname AS "owner", d.datname AS "database"
   FROM pg_prepared_xact() p("transaction" xid, gid text, "prepared" timestamp with time zone, ownerid oid, dbid oid)
   LEFT JOIN pg_authid u ON p.ownerid = u.oid
   LEFT JOIN pg_database d ON p.dbid = d.oid;
    

Documentation: pg_prepared_xacts

Change history

This view has remained unchanged since its introduction in PostgreSQL 8.1.

Categories

System catalogue, Transactions

See also

PREPARE TRANSACTION, max_prepared_transactions