Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 787EC1337B61 for ; Fri, 15 Oct 2010 11:21:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 20295-03; Fri, 15 Oct 2010 14:21:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by mail.postgresql.org (Postfix) with ESMTP id 9F065133729E; Fri, 15 Oct 2010 11:21:26 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id E7E1522252; Fri, 15 Oct 2010 10:21:26 -0400 (EDT) Date: Fri, 15 Oct 2010 10:21:26 -0400 From: Stephen Frost To: =?utf8?B?UmFkb3PFgmF3?= Smogura Cc: Magnus Hagander , David Fetter , Kevin Grittner , PG Hackers , PostgreSQL JDBC List , robertmhaas@gmail.com, tgl@sss.pgh.pa.us Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al. Message-ID: <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> <528f31015d6bf68650646b9b4ba71a10@smogura-softworks.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aTK6zbYcUydq6aaf" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.26-1-amd64 (x86_64) X-Uptime: 10:18:50 up 414 days, 1:43, 15 users, load average: 0.02, 0.09, 0.08 User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/1022 X-Sequence-Number: 172062 --aTK6zbYcUydq6aaf Content-Type: text/plain; charset=utf8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Rados=C5=82aw Smogura (rsmogura@softperience.eu) wrote: > > To me, that sounds like a bug in the connection pooler. It is only > > safe under quite limited circumstances. >=20 > 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 --aTK6zbYcUydq6aaf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAky4Y2YACgkQrzgMPqB3kijcHACdHYFWeWMNe6Yu8Y/hJReC9LQs McAAoJZWZDi6MsqoDuOavd9K5ROPPFhg =Pi8J -----END PGP SIGNATURE----- --aTK6zbYcUydq6aaf--