Can someone help me understand pg_locks? There are three fields related to virtual and real xids:
virtualtransaction | text | transactionid | xid | virtualxid | text | Our docs say 'virtualtransaction' is: Virtual ID of the transaction that is holding or awaiting this lock This field was clear to me. and 'transactionid' is documented as: ID of a transaction, or null if the object is not a transaction ID In my testing it was the (non-virtual) xid of the lock holder. Is that correct? Can it be a waiter? 'virtualxid' is documented as: Virtual ID of a transaction, or null if the object is not a virtual transaction ID In my testing this field is for locking your own vxid, meaning it owned by its own vxid. I looked at the C code in /pg/backend/utils/adt/lockfuncs.c and was confused. Clearly our documentation is lacking in this area and I would like to clarify it. -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers