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

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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Radosław Smogura <rsmogura(at)softperience(dot)eu>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, David Fetter <david(at)fetter(dot)org>,Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>,PG Hackers <pgsql-hackers(at)postgresql(dot)org>,PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>,robertmhaas(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: 2010-10-15 14:21:26
Message-ID: 20101015142126.GQ26232@tamriel.snowman.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc
* Radosław Smogura (rsmogura(at)softperience(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-10-15 14:23:27
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Previous:From: Tomáš PospíšilDate: 2010-10-15 14:08:45
Subject: Re: [HACKERS] XML schema validation

pgsql-jdbc by date

Next:From: Tom LaneDate: 2010-10-15 14:23:27
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Previous:From: Radosław SmoguraDate: 2010-10-15 09:11:44
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.

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