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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Radosław Smogura <rsmogura(at)softperience(dot)eu>, 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
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: 2010-10-15 14:38:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-jdbc
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Radosaw Smogura (rsmogura(at)softperience(dot)eu) wrote:
>> 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 :( ).

Yeah, actually what you need is DISCARD ALL when reassigning a
connection to another client.  Anything less than that assumes the
clients are cooperating closely, ie they *want* the same prepared
statements etc.  But even if you make that assumption, a pooler that
isn't even capable of sending an ABORT between clients doesn't seem
usable to me.  For example, if a client loses its network connection
mid-transaction, that failure will cascade to other clients if you
don't have any ability to reset the database session before handing
it to another client.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Mike FowlerDate: 2010-10-15 14:47:38
Subject: Re: Re: [HACKERS] XML schema validation
Previous:From: Tom LaneDate: 2010-10-15 14:29:28
Subject: Re: [GENERAL] pg_filedump binary for CentOS

pgsql-jdbc by date

Next:From: Stephen FrostDate: 2010-10-15 14:52:48
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Previous:From: Tom LaneDate: 2010-10-15 14:23:27
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.

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