Re: "Idle in Transaction" revisited.

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: "Idle in Transaction" revisited.
Дата
Msg-id 414D7846.1000508@bigfoot.com
обсуждение исходный текст
Ответ на Re: "Idle in Transaction" revisited.  (Jeffrey Tenny <jeffrey.tenny@comcast.net>)
Ответы Re: "Idle in Transaction" revisited.
Список pgsql-jdbc
Jeffrey Tenny wrote:
>> John R Pierce <pierce@hogranch.com>, pgsql-jdbc@postgresql.org
>>
>> Gaetano Mendola wrote:
>>
>>> John R Pierce wrote:
>>>
>>>> I'm curious what common practice is for threads that do nothing
>>>> but SELECTS... do folks just enable auto_commit, thereby
>>>> preventing pgJDBC from doing BEGIN; ?  Do they lace their code
>>>> with COMMIT() calls?
>>>
>>>
>>>
>>>
>>> We were bitten by this problem too, and my solution was to suggest
>>> our developer to do and explicit: "ABORT" after the connection, and
>>> do explicit "BEGIN"   "END"  instead of rely on the jdbc interface.
>>>
>>
>>
>> This is a pretty bad idea as it can confuse the driver's idea of the
>> current transaction state. For example, cursor-based resultsets won't
>> ever be used if you do your own transaction demarcation in this way.
>>
>> Better to use the standard JDBC autocommit API and a driver that has
>> the premature-BEGIN problem fixed.
> 
> 
> Second that, it's a very bad idea. I once naively had my own transaction 
> management using begin/end via jdbc for multi-statement transactions 
> against PostgreSQL.

I totally agree woth both of you but this is the only solution now, something
else to suggest ? The 8.0 version will work with a 7.4 engine ?



Regards
Gaetano Mendola








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

Предыдущее
От: Paul Thomas
Дата:
Сообщение: Re: "Idle in Transaction" revisited.
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: "Idle in Transaction" revisited.