On Fri, 1 Dec 2006, Marcin Waldowski wrote:
> I don't know a protocol yet, but perhaps it is possible to detect such
> problem with PostgreSQL database and throw SQLException. In this way
> stablity of Postgresql jdbc driver will be independent from stability of
> PostgreSQL (jdbc will not hang). If you tell me that it is possible and
> worth doing then I will try to find a solution and make a patch.
>
From the driver's perspective, it's just waiting on the results of a
query. It is unable to tell the difference between a query that takes a
very, very long time to execute and a query that isn't returning because
it is hung in the backend. Perhaps you could try setting
statement_timeout in the backend so it would abort after a certain period
of time. I'm not sure if this would be able to "unhang" a stuck process,
but it's the only thing that I can think of that might work.
Kris Jurka