65.2. Transactions and Locking#
The transaction IDs of currently executing transactions are shown inpg_locks in columnsvirtualxid andtransactionid. Read-only transactions will havevirtualxids but NULLtransactionids, while both columns will be set in read-write transactions.
Some lock types wait onvirtualxid, while other types wait ontransactionid. Row-level read and write locks are recorded directly in the locked rows and can be inspected using thepgrowlocks extension. Row-level read locks might also require the assignment of multixact IDs (mxid; seeSection 23.1.5.1).