From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | rsmogura(at)softperience(dot)eu, PG Hackers <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: [JDBC] Support for JDBC setQueryTimeout, et al. |
Date: | 2010-10-12 15:55:31 |
Message-ID: | 20101012155531.GB29627@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
On Tue, Oct 12, 2010 at 10:37:00AM -0500, Kevin Grittner wrote:
> David Fetter <david(at)fetter(dot)org> wrote:
> > Is there something incomplete about the ones I sent, and if so,
> > what?
>
> Well, I'm still curious why it was necessary to modify the server
> side to implement an interface feature for which everything needed
> seems to be present on the client side.
Not everything is.
Let's imagine you have a connection pooler with two clients, A and B.
A calls setQueryTimeout, then starts a query, which terminates in
time, but dies before handling it. B connects to the pool, gets A's
connection, and finds a statement_timeout that's not the default, 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*.
> Is this intended to be useful for other interfaces?
Anybody doing similar functionality, namely a per-statement timeout,
would need this infrastructure, and for the same reason.
> If so, we should probably have an implementation in some other
> interface to confirm that the server-side support fits. If not, why
> touch the server side code at all?
See above.
While I'd *like* to put in a whole infrastructure for setting GUCs on
a per-statement basis, I don't believe that we need to get out that
giant sledgehammer for this case, even though it's worth solving.
Incidentally, this dovetails neatly with the isolation concerns that
motivated the "true serializability" patch you're working on :)
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Carey | 2010-10-12 16:02:39 | Re: Slow count(*) again... |
Previous Message | david | 2010-10-12 15:54:24 | Re: Slow count(*) again... |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-10-12 16:23:56 | Re: [JDBC] Support for JDBC setQueryTimeout, et al. |
Previous Message | Kevin Grittner | 2010-10-12 15:37:00 | Re: [JDBC] Support for JDBC setQueryTimeout, et al. |