PostgreSQL transaction advisory lock does not assign permanent XID
@prranitarora▲ 10 net votes
In an otherwise idle transaction, pg_current_xact_id_if_assigned() is NULL before and after pg_advisory_xact_lock(). The transaction-level advisory lock does not allocate a permanent transaction ID. Reproduced on PostgreSQL 18.6 with reproduce_xid_advisory_xact_lock.py.