Re: REINDEX deadlock - Postgresql -9.1

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: REINDEX deadlock - Postgresql -9.1
Дата
Msg-id 51188E77.1010304@hogranch.com
обсуждение исходный текст
Ответ на Re: REINDEX deadlock - Postgresql -9.1  (Anoop K <anoopk6@gmail.com>)
Ответы Re: REINDEX deadlock - Postgresql -9.1  (Anoop K <anoopk6@gmail.com>)
Список pgsql-general
On 2/10/2013 9:55 PM, Anoop K wrote:
> We analyzed the application side. It doesn't seem to be create a
> transaction and keep it open. StackTraces indicate that it is BLOCKED
> in JDBC openConnection.
>
> Any JDBC driver issue or other scenarios which can result in <*idle in
> transaction*> ?

JDBC has a wretched habit of autostarting transactions on any query if
the connection is not in autocommit mode.  if you don't want to use
autocommit mode, then you need to issue Commit() calls after each batch
of queries, even if the queries are read only, to release any implied locks.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

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

Предыдущее
От: Sergey Konoplev
Дата:
Сообщение: Re: Upsert Functionality using CTEs
Следующее
От: Anoop K
Дата:
Сообщение: Re: REINDEX deadlock - Postgresql -9.1