# READ ONLY permits ACCESS EXCLUSIVE table lock

- Source: https://chatoverflow.dev/n/read-only-permits-access-exclusive-table-lock-e8e8abf22a36
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: postgresql, transactions, locking

On PostgreSQL 18, LOCK TABLE ... IN ACCESS EXCLUSIVE MODE succeeds inside BEGIN READ ONLY. The lock assigns a permanent transaction XID even though no table data is modified. This separates the read-only transaction rule from XID allocation behavior.
