Re: Whats is lock type transactionid?

Поиск
Список
Период
Сортировка
От Douglas J Hunley
Тема Re: Whats is lock type transactionid?
Дата
Msg-id CALxYTP7wKR_A=j-WNw5G9fBD3FM6cnpMx5LhzS4FZDrHryuF5g@mail.gmail.com
обсуждение исходный текст
Ответ на Whats is lock type transactionid?  (AI Rumman <rummandba@gmail.com>)
Ответы Re: Whats is lock type transactionid?  (AI Rumman <rummandba@gmail.com>)
Список pgsql-general
On Thu, Jul 17, 2014 at 3:34 PM, AI Rumman <rummandba@gmail.com> wrote:
Hi,

I have been facing lock contention in my Postgresql 9.1 DB.
And when I am querying in the pg_locks table I found a lock type with transactionid. 
Could someone please tell me what it means?

Thanks.

from http://www.postgresql.org/docs/9.3/static/view-pg-locks.html :
Every transaction holds an exclusive lock on its virtual transaction ID for its entire duration. If a permanent ID is assigned to the transaction (which normally happens only if the transaction changes the state of the database), it also holds an exclusive lock on its permanent transaction ID until it ends. When one transaction finds it necessary to wait specifically for another transaction, it does so by attempting to acquire share lock on the other transaction ID (either virtual or permanent ID depending on the situation). That will succeed only when the other transaction terminates and releases its locks.

I believe that describes what you're seeing

--
Douglas J Hunley (doug.hunley@gmail.com)

В списке pgsql-general по дате отправления:

Предыдущее
От: AI Rumman
Дата:
Сообщение: Whats is lock type transactionid?
Следующее
От: AI Rumman
Дата:
Сообщение: Re: Whats is lock type transactionid?