Re: Cancelling idle in transaction state

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Cancelling idle in transaction state
Дата
Msg-id alpine.BSO.2.00.0912300451440.4489@leary.csoft.net
обсуждение исходный текст
Ответ на Re: Cancelling idle in transaction state  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Cancelling idle in transaction state  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers

On Tue, 29 Dec 2009, Simon Riggs wrote:

>> The proposal is to send an additional NOTICE to the client and abort
>> all open transactions and subtransactions (this is what I got from the
>> previous discussion).
>
> Would this work with JDBC driver and/or general protocol clients?
>

A Notice would be easy to overlook.  The JDBC driver wraps that as a 
SQLWarning which callers need to explicitly check for (and rarely do in my 
experience).  So when they run their next statement they'll get an error 
saying that the current transaction is aborted, but they'll have no idea 
why as the warning was silently eaten.  I'd prefer the transaction 
cancellation to come as an Error because that's what it really is.

The only downside I can see is that a client would get confused if:

1) Transaction starts.
2) Idle transaction is killed and error message is given.
3) Client issues rollback
4) Client gets error message from saying the transaction was cancelled.

Kris Jurka


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

Предыдущее
От: "Tarun Sharma"
Дата:
Сообщение: solution to make static changes in pg_hba.conf file?
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: Cancelling idle in transaction state