From: Oliver Jowett <oliver@opencloud.com>
To: Paul Lindner <lindner@inuus.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statements vs. pgbouncer
Date: Sat, 29 Sep 2007 13:05:54 +1200
Message-ID: <46FDA4F2.8080507@opencloud.com> (raw)
In-Reply-To: <20070929002513.GG3140@inuus.com>
References: <20070929002513.GG3140@inuus.com>
Paul Lindner wrote:
> the assumption of a singular
> client->server backend is causing this problem.
Well, yes, that's fairly fundamental to the client-server protocol. It
sounds like pgbouncer is breaking the protocol.
You could perhaps do transparent statement/portal renaming in pgbouncer
but that seems to be only scratching the surface of the problem.
Consider your case here:
> * Client A creates statement S_1, fetches results.
> When finished the statement is put in a cleanup queue.
> * time passes
> * pgbouncer notices that client A is idle and reassigns backend to
> client B
Ok, now client A wakes up and wants to reuse S_1. What happens? The
backend that knows about S_1 is currently in use by B.
Changing the JDBC driver to handle a "server" that doesn't follow the
documented server protocol seems a bit backwards. I think you're going
to have to teach pgbouncer a whole lot more about statements and portals
to get this one working.
-O
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: oliver@opencloud.com, lindner@inuus.com
Subject: Re: Prepared Statements vs. pgbouncer
In-Reply-To: <46FDA4F2.8080507@opencloud.com>
References: <20070929002513.GG3140@inuus.com> <46FDA4F2.8080507@opencloud.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