From: Oliver Jowett <oliver@opencloud.com>
To: Paul Lindner <lindner@inuus.com>
Cc: Till Toenges <tt@kyon.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statements vs. pgbouncer
Date: Tue, 02 Oct 2007 10:46:44 +1300
Message-ID: <47016AC4.3010102@opencloud.com> (raw)
In-Reply-To: <20071001213237.GR3140@inuus.com>
References: <20070929002513.GG3140@inuus.com>
<87sl4xvmn2.fsf@oxford.xeocode.com>
<20070929144635.GK3140@inuus.com>
<46FED6A2.8000209@opencloud.com>
<20070930070725.GL3140@inuus.com>
<470125E2.9060505@kyon.de>
<20071001204917.GP3140@inuus.com>
<4701616A.5080300@opencloud.com>
<20071001213237.GR3140@inuus.com>
Paul Lindner wrote:
> On Tue, Oct 02, 2007 at 10:06:50AM +1300, Oliver Jowett wrote:
>> Paul Lindner wrote:
>> You'd have to recreate most of Postgresql's parsing and grammar inside of Pgbouncer
>> What? Why on earth would you need to recreate the SQL grammar inside
>> pgbouncer?! Justify this.
>
> Eh? I didn't mention Sql grammar.
Sorry if I misinterpreted what "most of Postgresql's parsing and
grammar" meant then.
> A proxy would at minimum have to
> track and maintain connection settings and portals and recreate them
> on each backend. However a full-featured proxy could parse any GUC
> statements.
I can think of a few ways around this offhand that don't require parsing
every statement going past (e.g. SHOW ALL, or individual SHOWs on the
subset of GUCs you care about, when considering whether to move a
connection). Even if you do have to inspect queries you hardly need a
full-blown lexer/parser to recognize SET, the syntax is fairly simple.
> In fact if you want full support for temporary tables (iffy) /
> temporary views (perhaps possible) and whatnot you will have to parse
> the SQL flying across the wire so you can recreate the session in it's
> entirety.
>
> Of course, I don't want nor need that.
I think it's acceptable to put some limits on what *application level*
SQL can do when running through pgbouncer, document that temporary
tables that are not ON COMMIT DROP aren't supported or whatever. You
could do the same for SET SESSION if you really wanted.
But the application usually can't do anything about the protocol level
stuff, so you pretty much have to get that right. Currently pgbouncer
does not do this.
-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, tt@kyon.de
Subject: Re: Prepared Statements vs. pgbouncer
In-Reply-To: <47016AC4.3010102@opencloud.com>
References: <20070929002513.GG3140@inuus.com> <87sl4xvmn2.fsf@oxford.xeocode.com> <20070929144635.GK3140@inuus.com> <46FED6A2.8000209@opencloud.com> <20070930070725.GL3140@inuus.com> <470125E2.9060505@kyon.de> <20071001204917.GP3140@inuus.com> <4701616A.5080300@opencloud.com> <20071001213237.GR3140@inuus.com> <47016AC4.3010102@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