Re: Deadlock problem

Поиск
Список
Период
Сортировка
От Vit Timchishin
Тема Re: Deadlock problem
Дата
Msg-id 200511221353.000000EK@dev-null
обсуждение исходный текст
Ответ на Re: Deadlock problem  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
On Mon, 21 Nov 2005 18:06:37 -0500 (EST), Kris Jurka wrote:

>
>
>On Mon, 21 Nov 2005, Vit Timchishin wrote:
>
>> I am not using one connection and at the time of block there is only one
>> active query (that is locked) at the whole database (in my test case).
>> But for one transaction it may be used by different java threads (e.g.
>> main thread and finalizer) and it seems that this is producing problems
>> because exclusive lock is held after statement have finished. It is
>> possible that I am still having open resultsets (did not check), but
>> they are all forward only and not updateable.
>>
>
>Locks are always held until transaction commit, not the end of an
>individual statement.  So, while you may only have one statement executing
>you have more than one transaction in progress and this is causing your
>deadlocks.

This is not the problem. I know good about locks, but this one:
 relation | database | transaction |  pid  |      mode       | granted
----------+----------+-------------+-------+-----------------+---------
          |          |     1109601 | 32172 | ExclusiveLock   | t

1) Not related to any relation. Relation and database fields are null
2) Intertransaction - transaction field of lock that is granted (example above) and that is trying to lock are
equal. The only difference is the pid column (and that the lock that is trying is SharedLock and granted = f).


С уважением,
Виталий Валериевич Тимчишин,
Технический Директор
ООО "Голден Технолоджис"
http://www.gtech-ua.com




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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Can PostgreSQL do data type automated casting in
Следующее
От: Benjamin Stookey
Дата:
Сообщение: Re: Deploying my application (nesting the jar)