From: Paul Lindner <lindner@inuus.com>
To: Gregory Stark <stark@enterprisedb.com>
Cc: Paul Lindner <lindner@inuus.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statements vs. pgbouncer
Date: Sat, 29 Sep 2007 07:46:35 -0700
Message-ID: <20070929144635.GK3140@inuus.com> (raw)
In-Reply-To: <87sl4xvmn2.fsf@oxford.xeocode.com>
References: <20070929002513.GG3140@inuus.com>
<87sl4xvmn2.fsf@oxford.xeocode.com>
On Sat, Sep 29, 2007 at 10:36:33AM +0100, Gregory Stark wrote:
>
> "Paul Lindner" <lindner@inuus.com> writes:
>
> > * pgbouncer notices that client A is idle and reassigns backend to
> > client B
>
> What do you mean by "notices"?
Okay, I wasn't being clear. In pgbouncer at the END of a commit the
backend will be put into the idle pool. Please read the following:
https://developer.skype.com/SkypeGarage/DbProjects/PgBouncer> Prepared statements are only one form of state which can persist beyond a
> transaction end. I don't think you can reassign connections unless you get
> some sort of explicit notice that the client is done with any state it has set
> up. Either the driver supports noticing such a state because there are no
> active references to its handle or the client issues a statement like RESET
> ALL or something equivalent.
Okay.
How do we fix this? Short term? Long term?
For this specific case a long term fix might involve
transaction-scoped prepared statements. Of course that would require
adding this feature on many levels.
Should middleware products track all prepared statements and re-send
those to each backend? What happens when you have collisions between
names?
Should auto-generated prepared statements use a common hashing method
to insure that we don't recreate the same prepared statement over and
over?
--
Paul Lindner ||||| | | | | | | | | |
lindner@inuus.com
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: lindner@inuus.com, stark@enterprisedb.com
Subject: Re: Prepared Statements vs. pgbouncer
In-Reply-To: <20070929144635.GK3140@inuus.com>
References: <20070929002513.GG3140@inuus.com> <87sl4xvmn2.fsf@oxford.xeocode.com> <20070929144635.GK3140@inuus.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