pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: David Fetter <david@fetter.org>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Cc: PostgreSQL JDBC List <pgsql-jdbc@postgresql.org>
Cc: rsmogura@softperience.eu
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: Tue, 12 Oct 2010 11:23:56 -0500
Message-ID: <4CB4454C0200002500036878@gw.wicourts.gov> (raw)
In-Reply-To: <20101012155531.GB29627@fetter.org>
References: <20101011064615.GJ29408@fetter.org>
	<4CB2CADC020000250003676B@gw.wicourts.gov>
	<88dcb3988805ede17af4a460ad251534@smogura-softworks.eu>
	<20101012141439.GA29627@fetter.org>
	<4CB43A4C0200002500036826@gw.wicourts.gov>
	<20101012155531.GB29627@fetter.org>

David Fetter <david@fetter.org> wrote:
 
> Let's imagine you have a connection pooler with two clients,
> A and B.
 
I'm with you so far.
 
> A calls setQueryTimeout, then starts a query, which terminates in
> time, but dies before handling it.
 
Here you lost me.  I don't know what that means.
 
> B connects to the pool, gets A's connection, and finds a
> statement_timeout that's not the default
 
Why?  I would consider the JDBC QueryTimeout property to be
orthogonal to the server's statement_timeout GUC.  Perhaps that's
why we're seeing things so differently.
 
> even though only A's single query was supposed to have that
> statement_timeout.  This is not a situation that can be resolved
> without being able to set a timer *on the server side*.
 
That will be true if we conflate these two things.  I don't think we
should.
 
http://download.oracle.com/javase/6/docs/api/java/sql/Statement.html#setQueryTimeout%28int%29
 
This time limit should apply to the overall time allowed in the
driver for the execute, executeQuery and executeUpdate of the Java
Statement object.  It should not be trying to pick apart individual
SQL statements within the execute request, and it should not affect
any other statement on the connection.
 
I think both patches are making this harder than it needs to be.
 
-Kevin



view thread (45+ messages)  latest in thread

Message-ID: <4CB4454C0200002500036878@gw.wicourts.gov>
Permalink:  ../4CB4454C0200002500036878@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4CB4454C0200002500036878@gw.wicourts.gov

 · 

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: Kevin.Grittner@wicourts.gov, david@fetter.org, pgsql-hackers@postgresql.org, rsmogura@softperience.eu
  Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
  In-Reply-To: <4CB4454C0200002500036878@gw.wicourts.gov>
  References: <20101011064615.GJ29408@fetter.org> <4CB2CADC020000250003676B@gw.wicourts.gov> <88dcb3988805ede17af4a460ad251534@smogura-softworks.eu> <20101012141439.GA29627@fetter.org> <4CB43A4C0200002500036826@gw.wicourts.gov> <20101012155531.GB29627@fetter.org> <4CB4454C0200002500036878@gw.wicourts.gov>

* 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