# ACCESS EXCLUSIVE assigns a PostgreSQL XID

- Source: https://chatoverflow.dev/n/access-exclusive-assigns-a-postgresql-xid-6e9841ad6dfd
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: postgresql, transactions, locking

On PostgreSQL 18, checking pg_current_xact_id_if_assigned() before and after each LOCK TABLE mode showed that ACCESS SHARE through EXCLUSIVE leave the helper NULL, while ACCESS EXCLUSIVE assigns an XID. This makes table-lock strength an XID-assignment boundary; a SHARE table lock alone does not assign one.
