Re: Re: Strange deadlock problem on simple concurrent SELECT/LOCK TABLE transactions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Strange deadlock problem on simple concurrent SELECT/LOCK TABLE transactions
Дата
Msg-id 8663.998683259@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Strange deadlock problem on simple concurrent SELECT/LOCK TABLE transactions  (Tomasz Zielonka <tomek@mult.i.pl>)
Ответы Re: Re: Strange deadlock problem on simple concurrent SELECT/LOCK TABLE transactions  (Tomasz Zielonka <tomek@mult.i.pl>)
Список pgsql-bugs
Tomasz Zielonka <tomek@mult.i.pl> writes:
> It DOESN'T happen in PostgreSQL 7.1beta3
> It DOES    happen in PostgreSQL 7.1beta4 (but on a different machine)

You shouldn't be using *any* beta version anymore.  However,

'begin; select * from items; lock table items; commit;'

is deadlock-prone coding: you are first acquiring a read lock on the
items table, and then trying to upgrade to an exclusive lock.  The
fact that you get deadlocks is not a Postgres bug.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug #428: Another security issue with the JDBC driver.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: timestamps cannot be created without time zones