pg_snapshot_xmax()

A function returning the xmax value of a snapshot

pg_snapshot_xmax() is a system function returning the xmax value of a snapshot.

pg_snapshot_xmax() was added in PostgreSQL 13.

Usage

pg_snapshot_xmax ( pg_snapshot ) → xid8

pg_snapshot_xmax() replaces txid_snapshot_xmax().

Change history

Examples

Basic usage example for pg_snapshot_xmax():

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

postgres=# SELECT pg_snapshot_xmax(pg_current_snapshot());
 pg_snapshot_xmax 
------------------
              799
(1 row)

Categories

System function, Transactions

See also

pg_snapshot_xmin(), pg_snapshot_xip(), pg_current_snapshot()