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

Re: [JDBC] Support for JDBC setQueryTimeout, et al.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: david(at)fetter(dot)org, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org, rsmogura(at)softperience(dot)eu, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: 2010-10-21 18:06:08
Message-ID: 201010211806.o9LI68Z23488@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc
Kevin Grittner wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>  
> > why would we do this client-side rather than server-side?
>  
> Because the timeout is supposed to be a limit on the time allowed
> for specific Java methods to complete, which might be running a
> large number of SQL statements within one invocation, and which may
> include significant network latency.  It's a lot of work to get
> "pretty close" on the server side, and you can never really
> implement exactly what the JDBC API is requesting.
>  
> What if you have an app which can draw data from any of a number of
> remote databases, and you want to use this limit so if one becomes
> unavailable for some reason you can re-run the request on another
> within a reasonable time?  The network connection goes down after
> you submit your request, you've got a period of minutes or hours
> until TCP gives up, and the user expects a response within a few
> seconds...
>  
> If you implement something with server-side semantics, there's
> nothing to prevent an application which is PostgreSQL-aware from
> accessing it through JDBC, of course.  statement_timeout and other
> GUCs can be set locally to your heart's content.

OK, thanks.  Just had to ask.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-10-21 18:07:25
Subject: Exposing an installation's default value of unix_socket_directory
Previous:From: Kevin GrittnerDate: 2010-10-21 18:00:28
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.

pgsql-jdbc by date

Next:From: Thomas KellererDate: 2010-10-21 19:54:14
Subject: Re: Bug in DatabaseMetaData.getColumns() with columns based on domains
Previous:From: Kevin GrittnerDate: 2010-10-21 18:00:28
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.

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