Re: Locking on PGStream.ReceiveChar(PGStream.java:256) - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Locking on PGStream.ReceiveChar(PGStream.java:256)
Date
Msg-id Pine.BSO.4.64.0612011817280.30076@leary2.csoft.net
Whole thread Raw
In response to Re: Locking on PGStream.ReceiveChar(PGStream.java:256)  (Marcin Waldowski <M.Waldowski@sulechow.net>)
List pgsql-jdbc

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

pgsql-jdbc by date:

Previous
From: Marcin Waldowski
Date:
Subject: Re: Locking on PGStream.ReceiveChar(PGStream.java:256)
Next
From: Wolfgang Rinnert
Date:
Subject: web-app not working after upgrade 7.4 to 8.1