Re: Statement.cancel() race condition
От | Kris Jurka |
---|---|
Тема | Re: Statement.cancel() race condition |
Дата | |
Msg-id | Pine.BSO.4.61.0512012211440.29741@leary.csoft.net обсуждение исходный текст |
Ответ на | Re: Statement.cancel() race condition (Kris Jurka <books@ejurka.com>) |
Список | pgsql-jdbc |
On Thu, 1 Dec 2005, Kris Jurka wrote: > On Thu, 1 Dec 2005, Kevin Grittner wrote: > >> >> The problem is that even after the exception comes out of this code, is >> caught, and the transaction is rolled back -- we are still often able to >> start another statement which is running by the time the server gets >> around to interrupting the related back end process. Obviously, having >> the cancel of one statement actually interrupt the processing of a >> subsequent statement violates the popular principle of "least surprising >> result". >> > > I think taking the ReceiveEOF portion of this patch: > > http://archives.postgresql.org/pgsql-jdbc/2003-09/msg00175.php > > would fix this in the single thread case. The multi-threaded case is > obviously more complicated. I don't recall why the original patch wasn't > committed. > I've applied this fix for single threaded applications to 8.0, 8.1 and HEAD. The multi-threaded stuff is more complicated than I'd like to get into at the moment. Kris Jurka
В списке pgsql-jdbc по дате отправления: