pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrea Spinelli <aspinelli@imteam.it>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter
Date: Fri, 10 Aug 2007 18:53:45 +0200
Message-ID: <46BC9819.4000807@imteam.it> (raw)
In-Reply-To: <Pine.BSO.4.64.0708100538530.31534@leary.csoft.net>
References: <46BC20B6.4080409@imteam.it>
	<Pine.BSO.4.64.0708100538530.31534@leary.csoft.net>

Kris Jurka wrote:

> On Fri, 10 Aug 2007, Andrea Spinelli wrote:
>
>
> I believe this is a bug in the 8.1 windows port.  What's the exact 
> version you are using?  I think this was fixed in 8.1.6.

The exact version I am using is 8.1.4 - so my version is old - good! 
There is hope that upgrading will fix everything!

>
> People want the query to be stopped, but they don't want their whole 
> connection to be killed which is what your change does.
>
I see your point, but - as far as I know - there is no way of 
interrupting a running query (short of exiting from the main 
executable); so maybe a (large) timeout  would be a safe way of 
protecting against trouble.  As to killing the connection, using a 
connection pool may mitigate the problem.

Better a broken connection in a running thread than a useless thread 
which cannot be interrupted!

Of course, my perspective is mainly related to web applications - 
standalone applications might use other techniques.

Anyway, if you plan to support query timeouts, as you suggest in another 
message, that would be perfect.

IMHO, depending on your plans, the "socketTimeout" strategy could be a 
temporary fix if the "setQueryTimeout" is too far in the future.

Just my suggestions after a week of stress-testing a busy server! I love 
postgreSQL and thank everybody for their efforts here!

Andrea Spinelli




view thread (6+ messages)  latest in thread

Message-ID: <46BC9819.4000807@imteam.it>
Permalink:  ../46BC9819.4000807@imteam.it/
Also on:    postgresql.org/message-id/46BC9819.4000807@imteam.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: aspinelli@imteam.it, books@ejurka.com
  Subject: Re: executeQuery hangs on busy server - PROPOSAL: socketTimeout parameter
  In-Reply-To: <46BC9819.4000807@imteam.it>
  References: <46BC20B6.4080409@imteam.it> <Pine.BSO.4.64.0708100538530.31534@leary.csoft.net> <46BC9819.4000807@imteam.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox