Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8074E9FB378 for ; Wed, 1 Aug 2007 17:32:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 04177-06 for ; Wed, 1 Aug 2007 17:31:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.235]) by postgresql.org (Postfix) with ESMTP id C4DD29FB34D for ; Wed, 1 Aug 2007 17:32:05 -0300 (ADT) Received: by hu-out-0506.google.com with SMTP id 22so229885hug for ; Wed, 01 Aug 2007 13:32:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=MbyLXyKtj7ltEGa/eg73VW17iS9M0DXdzvfO9nDC3uiQKyHG+eN7I428sahpYrpQaTJikAi/U1ty8dP3SzIUGI65Ym25hI2yJezPbsYjP21ALZzGtyOxVwLg9Bph5qaHwlb62r6OHptyWWZP9FrI8XjH6ysB22MVmJEUe5plYW4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=K/RjfT2FNmPjP+WVHZV9bcS1GRGHVtNowlQhIhqAT8O6iL5BAIjvIeiCy4WM7noRi4c5wesBm4CpTxcvmre4iStgSuPm8CPUXthwAS5BQcKb9rQMnUQiMs+pBl1F25QkrQisf/YOuAE+Tqx3mB1PUnh9G+tDXv01PPCJgpNWejQ= Received: by 10.86.51.2 with SMTP id y2mr826444fgy.1186000324124; Wed, 01 Aug 2007 13:32:04 -0700 (PDT) Received: from ?192.168.0.199? ( [80.222.48.97]) by mx.google.com with ESMTPS id f19sm2297061fka.2007.08.01.13.32.00 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Aug 2007 13:32:00 -0700 (PDT) Message-ID: <46B0EDB6.5050603@enterprisedb.com> Date: Wed, 01 Aug 2007 21:31:50 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: Csaba Nagy CC: Dave Cramer , List Subject: Re: statement caching patch from Laszlo Hornyak for review References: <2937D635-FCCB-471A-B1DA-AF0E0E0C18EB@fastcrypt.com> <46AFA547.9010407@enterprisedb.com> <1185956455.17154.7.camel@PCD12478.muc.ecircle.de> In-Reply-To: <1185956455.17154.7.camel@PCD12478.muc.ecircle.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/2 X-Sequence-Number: 17315 Csaba Nagy wrote: >> In fact, how about kicking our connection pool implementation out to an >> external module as well? The connection pool and the statement cache >> could live together as a pgfoundry project, or as an additional jar in >> the jdbc project. > > The postgres ConnectionPool implementation included in the JDBC project > already has some postgres specific bits (e.g. setPreparedThreashold), > and I find it is not specific enough, as it is quite hard to set > postgres specific settings on the pooled connections otherwise, as the > place where the pool is configured is the natural place where all other > default connection properties should be configured too. So my opinion is > to make the ConnectionPool implementation as specific for postgres as it > is reasonable, allowing to set most of the things you could set on a > postgres connection. In particular it would be nice to set the default > properties to pass on when creating a new pooled connection (this is > actually not really postgres specific now that I think about it, but > prepareThreshold is). You could have extra methods to set any driver-specific properties in the generic connection pool implementation. With reflection, I think you could also create a proxy DataSource class that implements all the same driver-specific methods as the underlaying DataSource. What do you think of the idea of just moving the current implementation to an additional jar? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com