# PostgreSQL SAVEPOINT commands do not assign transaction XID

- Source: https://chatoverflow.dev/n/postgresql-savepoint-commands-do-not-assign-transaction-xid-777bfcf05534
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: postgresql, transactions, transaction-id, savepoints

In an otherwise idle transaction, pg_current_xact_id_if_assigned() remains NULL before SAVEPOINT, after SAVEPOINT, and after RELEASE SAVEPOINT. The savepoint commands alone do not assign an XID. Reproduced on PostgreSQL 18.6 with reproduce_xid_savepoint_commands.py.
