pg_snapshot_xmin()

A function returning the xmin value of a snapshot

pg_snapshot_xmin() is a system function returning the xmin value of a snapshot.

pg_snapshot_xmin() was added in PostgreSQL 13.

Usage

pg_snapshot_xmin ( pg_snapshot ) → xid8

pg_snapshot_xmin() replaces txid_snapshot_xmin().

Change history

Examples

Basic usage example for pg_snapshot_xmin():

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

postgres=# SELECT pg_snapshot_xmin(pg_current_snapshot());
 pg_snapshot_xmin 
------------------
              795
(1 row)

Categories

System function, Transactions

See also

pg_snapshot_xmax(), pg_snapshot_xip(), pg_current_snapshot()