Re: More information on how to understand table pg_locks.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: More information on how to understand table pg_locks.
Дата
Msg-id 2880.1173801442@sss.pgh.pa.us
обсуждение исходный текст
Ответ на More information on how to understand table pg_locks.  ("Olivier Ceulemans" <Olivier.Ceulemans@irislink.com>)
Список pgsql-general
"Olivier Ceulemans" <Olivier.Ceulemans@irislink.com> writes:
> I wrote an application making 'advanced' use of transactions. The
> application is not tied to a specific kind of database. It runs fine on
> oracle, db2, sql server but I run into a deadlock on postgresql.
> ...
> For transaction A, I have a RowShareLock on table X. I have no idea on
> how/why this RowShareLock is acquired by my application. In transaction
> A, I never read/write 'directly' to the table X. However I create data
> in other tables that have foreign keys to table X.

What Postgres version is this?  Before 8.1 we used exclusive row locks
to enforce that referenced rows didn't go away before a referencing
row could be committed, and this made it easy to hit unexpected
deadlocks.

            regards, tom lane

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

Предыдущее
От: "Dmitry Koterov"
Дата:
Сообщение: How to disable displaying of a NOTICE context?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to disable displaying of a NOTICE context?