pg_snapshot_xip()

A function returning a snapshot's in-progress transaction IDs

pg_snapshot_xip() is a system function returning the set of in-progress transaction IDs contained in a snapshot.

pg_snapshot_xip() was added in PostgreSQL 13.

Usage

pg_snapshot_xip ( pg_snapshot ) → setof xid8

pg_snapshot_xip() replaces txid_snapshot_xip().

Change history

Examples

Basic usage example for pg_snapshot_xip():

postgres=# SELECT pg_current_snapshot();
 pg_current_snapshot 
---------------------
 795:799:795,797
(1 row)

postgres=# SELECT * FROM pg_snapshot_xip(pg_current_snapshot());
 pg_snapshot_xip 
-----------------
             795
             797
(2 rows)

Categories

System function, Transactions

See also

pg_snapshot_xmin(), pg_snapshot_xmax(), pg_current_snapshot()