Need help understanding pg_locks
От | Bruce Momjian |
---|---|
Тема | Need help understanding pg_locks |
Дата | |
Msg-id | 201107100401.p6A41JR02682@momjian.us обсуждение исходный текст |
Ответы |
Re: Need help understanding pg_locks
|
Список | pgsql-hackers |
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 <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления: