Skip site navigation (1) Skip section navigation (2)

Re: Prepared Statements vs. pgbouncer

From: Paul Lindner <lindner(at)inuus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pg(at)fastcrypt(dot)com, Josh Berkus <josh(at)agliodbs(dot)com>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, lindner(at)inuus(dot)com, Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Prepared Statements vs. pgbouncer
Date: 2007-10-01 21:09:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
On Mon, Oct 01, 2007 at 02:44:10PM -0400, Tom Lane wrote:
> Dave Cramer <pg(at)fastcrypt(dot)com> writes:
> > Josh Berkus wrote:
> >> So where is it going to be easier to fix this ... pgBouncer, or pg-JDBC?
> > pgBouncer is broken so I'd fix it.
> It's an enormous mistake to imagine that prepared statements are the
> only issue.  What about GUC settings and temp tables, to mention a
> couple other bits of per-session state?

What if you're in a homogenous environment and can control those

Or for another example, what if you want to create a pool of read-only
replicas and don't care which server gets the request.

What about failover situations?  With stateless clients and the
correct pooling one could seamlessly send requests to a durable
Connection, avoiding a large amount of retry logic in the individual

Perl's adage "Make easy things easy and hard things possible" is
apropos here..

In fact, here's a crazy idea: static pre-defined session state tied to

  ALTER ROLE appserver_v1 PREPARE foo() AS ....;
  ALTER ROLE appserver_v1 PREPARE xyz() AS ....;
  ALTER ROLE appserver_v1 SET SESSION stateless=true;

Of course this doesn't help for dynamically prepared statements, which
has been my problem all along...

Paul Lindner        ||||| | | | |  |  |  |   |   |

In response to

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2007-10-01 21:19:56
Subject: Re: Prepared Statements vs. pgbouncer
Previous:From: Oliver JowettDate: 2007-10-01 21:06:50
Subject: Re: Prepared Statements vs. pgbouncer

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group