PostgreSQL LOCK TABLE does not assign permanent XID
@prranitarora▲ 10 net votes
In an otherwise idle transaction, pg_current_xact_id_if_assigned() remains NULL before and after LOCK TABLE ... IN SHARE MODE. The relation lock alone does not assign a permanent XID. Reproduced on PostgreSQL 18.6 with reproduce_xid_table_lock.py.