From: Stephen Frost <sfrost@snowman.net>
To: Radosław Smogura <rsmogura@softperience.eu>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: David Fetter <david@fetter.org>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Cc: PostgreSQL JDBC List <pgsql-jdbc@postgresql.org>
Cc: robertmhaas@gmail.com
Cc: tgl@sss.pgh.pa.us
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: Fri, 15 Oct 2010 10:21:26 -0400
Message-ID: <20101015142126.GQ26232@tamriel.snowman.net> (raw)
In-Reply-To: <c17d0cbfea679088a106a9c9b573196c@smogura-softworks.eu>
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>
<AANLkTi=m7tzv7RzCmqD6ARWm_QWbg90Jmd0uTkosiZo4@mail.gmail.com>
<528f31015d6bf68650646b9b4ba71a10@smogura-softworks.eu>
<AANLkTinFMPHaa1SH-uf7fqBTkVcMZYRpxqjaaYUKHEHA@mail.gmail.com>
<c17d0cbfea679088a106a9c9b573196c@smogura-softworks.eu>
* Radosław Smogura (rsmogura@softperience.eu) wrote:
> > To me, that sounds like a bug in the connection pooler. It is only
> > safe under quite limited circumstances.
>
> It's hard to say this is bug. The GF connection pooler is "general pooler"
> for all drivers, so it can't know anything about reseting, and if I have
> right JDBC4 doesn't support such notifications. It can't close logical
> connections, as if would close, cached statements will be invalideted too.
If it can't figure out a way to issue a command in between handing
around a connection to different clients then, yeah, I'd call it a bug
that needs to be fixed. Maybe other systems don't need it, and it can
be a no-op there, but the capability certainly needs to be there.
> But benefits of pooling statements are much more greater then RESET ALL,
> because you can take advance of precompiling prepared statements,
> increasing performance; it is comparable to using connection pool instead
> of starting physical connections.
errr, I don't believe RESET ALL touches cache'd plans and whatnot (which
is actually a problem I've run into in the past, because changing the
search_path also doesn't invalidate plans, and neither does set role, so
you end up with cache'd plans that try to hit things you don't have
permissions to any more :( ).
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 196B) download
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: sfrost@snowman.net, rsmogura@softperience.eu, magnus@hagander.net, david@fetter.org, Kevin.Grittner@wicourts.gov, pgsql-hackers@postgresql.org, robertmhaas@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
In-Reply-To: <20101015142126.GQ26232@tamriel.snowman.net>
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> <AANLkTi=m7tzv7RzCmqD6ARWm_QWbg90Jmd0uTkosiZo4@mail.gmail.com> <528f31015d6bf68650646b9b4ba71a10@smogura-softworks.eu> <AANLkTinFMPHaa1SH-uf7fqBTkVcMZYRpxqjaaYUKHEHA@mail.gmail.com> <c17d0cbfea679088a106a9c9b573196c@smogura-softworks.eu> <20101015142126.GQ26232@tamriel.snowman.net>
* 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