Contents
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
- PostgreSQL 13
- added (commit 4c04be9b)
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)
References
- PostgreSQL documentation: Transaction ID and Snapshot Information Functions