pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Rainer Frey <rainer.frey@inxmail.de>
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-jdbc@postgresql.org
Subject: Re: BUG #1459: Connection hangs when other connection is not
Date: Sat, 05 Feb 2005 08:35:41 +1300
Message-ID: <4203CE8D.1050301@opencloud.com> (raw)
In-Reply-To: <200502041515.00657.peter_e@gmx.net>
References: <20050203151126.467DC9A5818@www.postgresql.com>
	<200502041054.16723.peter_e@gmx.net>
	<42035480.2060707@inxmail.de>
	<200502041515.00657.peter_e@gmx.net>

Peter Eisentraut wrote:
> Am Freitag, 4. Februar 2005 11:54 schrieb Rainer Frey:
> 
>>Is there any possibility to set a timeout for the lock, after which the
>>ALTER TABLE statement fails, instead of remaining in wait status (when
>>calling with JDBC?
> 
> Yes, there is a statement_timeout parameter or something like that.

JDBC has a couple of mechanisms that may be more portable than fiddling 
with statement_timeout directly:

- Statement.setQueryTimeout(). This is *not* implemented by the current 
driver (it is a no-op), but shouldn't be too hard to implement as 
mapping to statement_timeout if you feel inclined to do some driver hacking.

- Statement.cancel(). This is implemented by the current driver, but you 
will need to build your own infrastructure to handle doing the cancel 
from a separate thread if a query takes too long.

-O



view thread (6+ messages)  latest in thread

Message-ID: <4203CE8D.1050301@opencloud.com>
Permalink:  ../4203CE8D.1050301@opencloud.com/
Also on:    postgresql.org/message-id/4203CE8D.1050301@opencloud.com

 · 

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: oliver@opencloud.com, peter_e@gmx.net, rainer.frey@inxmail.de, pgsql-bugs@postgresql.org
  Subject: Re: BUG #1459: Connection hangs when other connection is not
  In-Reply-To: <4203CE8D.1050301@opencloud.com>
  References: <20050203151126.467DC9A5818@www.postgresql.com> <200502041054.16723.peter_e@gmx.net> <42035480.2060707@inxmail.de> <200502041515.00657.peter_e@gmx.net> <4203CE8D.1050301@opencloud.com>

* 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