pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: László Hornyák <kocka.public@gmail.com>
Cc: Paul van den Bogaard <Paul.Vandenbogaard@sun.com>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: statement caching patch from Laszlo Hornyak for review
Date: Thu, 30 Aug 2007 09:14:10 +0100
Message-ID: <46D67C52.60902@enterprisedb.com> (raw)
In-Reply-To: <5A1478D3-8DBA-4FC2-B239-EE96A57A71C8@fastcrypt.com>
References: <2937D635-FCCB-471A-B1DA-AF0E0E0C18EB@fastcrypt.com>
	<46B1B5CE.1050409@opencloud.com>
	<Pine.BSO.4.64.0708021252420.14791@leary.csoft.net>
	<33E43614-DF0E-4913-92DB-2E8EC4B1E156@fastcrypt.com>
	<46B3B590.5060600@opencloud.com>
	<531718e20708032347q87bf7efs11e748cbb61847aa@mail.gmail.com>
	<670726BC-C614-41DA-B1F3-03DC49441690@sun.com>
	<809bf8d30708100104r1d5de68ey8d553173090874a1@mail.gmail.com>
	<809bf8d30708100309n7f49e1bau933e762029442700@mail.gmail.com>
	<5A1478D3-8DBA-4FC2-B239-EE96A57A71C8@fastcrypt.com>

Dave Cramer wrote:
> I just noticed this:
> 
> Now that JDBC 4 has a notion of pooling built right into the statement
> interface it is clear (to me at least) that the implementation belongs
> in the driver.

In chapter 11.6, "Reuse of Statements by Pooled Connection", the spec says:

> In FIGURE 11-2, the connection pool and statement pool are implemented by the
> application server. However, this functionality could also be implemented by the
> driver or underlying data source. This discussion of statement pooling is meant to
> allow for any of these implementations.

The new methods added in JDBC4, setPoolable and isPoolable are for use
by applications to hint the connection pool implementation which
statements it should try to pool. Statements are poolable by default, so
it's really for telling the pool not to bother pooling one off queries.

I still don't think it's wise for us to bundle a statement cache in the
driver. If we had a server-side statement cache, or if there was some
other PostgreSQL specific trick we could take advantage of, it would
make sense to provide an interface for it. But there isn't.

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com



view thread (19+ messages)  latest in thread

Message-ID: <46D67C52.60902@enterprisedb.com>
Permalink:  ../46D67C52.60902@enterprisedb.com/
Also on:    postgresql.org/message-id/46D67C52.60902@enterprisedb.com

 · 

reply

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: heikki@enterprisedb.com, pg@fastcrypt.com, kocka.public@gmail.com, Paul.Vandenbogaard@sun.com, oliver@opencloud.com, books@ejurka.com
  Subject: Re: statement caching patch from Laszlo Hornyak for review
  In-Reply-To: <46D67C52.60902@enterprisedb.com>
  References: <2937D635-FCCB-471A-B1DA-AF0E0E0C18EB@fastcrypt.com> <46B1B5CE.1050409@opencloud.com> <Pine.BSO.4.64.0708021252420.14791@leary.csoft.net> <33E43614-DF0E-4913-92DB-2E8EC4B1E156@fastcrypt.com> <46B3B590.5060600@opencloud.com> <531718e20708032347q87bf7efs11e748cbb61847aa@mail.gmail.com> <670726BC-C614-41DA-B1F3-03DC49441690@sun.com> <809bf8d30708100104r1d5de68ey8d553173090874a1@mail.gmail.com> <809bf8d30708100309n7f49e1bau933e762029442700@mail.gmail.com> <5A1478D3-8DBA-4FC2-B239-EE96A57A71C8@fastcrypt.com> <46D67C52.60902@enterprisedb.com>

* 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