From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Fetter <david@fetter.org>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: rsmogura@softperience.eu, PG Hackers <pgsql-hackers@postgresql.org>
Cc: PostgreSQL JDBC List <pgsql-jdbc@postgresql.org>
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: Tue, 12 Oct 2010 15:29:35 -0400
Message-ID: <4983.1286911775@sss.pgh.pa.us> (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> writes:
> 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*.
Actually, that seems like a fine argument why this should *not* be
implemented on the server side... although I would expect a connection
pooler to roll back GUC changes when switching users, so the argument
seems to presume several rather broken implementation decisions in
order to make the scenario possible.
> 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.
You'd need to first convince people that SET LOCAL doesn't solve the
problem well enough already.
regards, tom lane
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: tgl@sss.pgh.pa.us, david@fetter.org, Kevin.Grittner@wicourts.gov, pgsql-hackers@postgresql.org
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
In-Reply-To: <4983.1286911775@sss.pgh.pa.us>
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> <4983.1286911775@sss.pgh.pa.us>
* 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