Skip site navigation (1) Skip section navigation (2)

Re: Locking on PGStream.ReceiveChar(PGStream.java:256)

From: Kris Jurka <books(at)ejurka(dot)com>
To: Marcin Waldowski <M(dot)Waldowski(at)sulechow(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Locking on PGStream.ReceiveChar(PGStream.java:256)
Date: 2006-12-01 23:20:00
Message-ID: Pine.BSO.4.64.0612011817280.30076@leary2.csoft.net (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-jdbc by date

Next:From: Wolfgang RinnertDate: 2006-12-02 12:35:08
Subject: web-app not working after upgrade 7.4 to 8.1
Previous:From: Marcin WaldowskiDate: 2006-12-01 21:55:33
Subject: Re: Locking on PGStream.ReceiveChar(PGStream.java:256)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group