Re: Prepared Statements vs. pgbouncer

From: Till Toenges <tt(at)kyon(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Prepared Statements vs. pgbouncer
Date: 2007-10-01 16:52:50
Message-ID: 470125E2.9060505@kyon.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Paul Lindner wrote:
> 1) Use hashing to choose a prepared statement name
>
> If we take the hash of the prepared statement text and prefix with
> S_ we can be assured of using the same unique prepared statement
> name across all application servers.
>
> (And yes, I know that hashes are not perfect and collisions can
> occur. Highly unlikely if we choose a good hash)

This sounds like a bad idea on many levels. Don't do it. Actually, i
think the driver is ok and the real problem is pgbouncer.

I have another solution to your problem:

You said that there are 100s of Servers, i assume that there is some
money behind that. Talk to the pgbouncer developers. Ask them to analyze
your problem and what it would cost to fix it. Ask them what it would
cost to make pgbouncer fully compliant, because it's probably not the
only feature you will miss. Figure out if this is cheaper than replacing
/ upgrading your hardware with something powerful enough to handle the
load without pgbouncer. Pick the cheaper solution. Done.

"Fixing" the jdbc driver is probably not a stable long term solution,
even if it helps with your most immediate problem.

Till

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Josh Berkus 2007-10-01 18:18:54 Re: Prepared Statements vs. pgbouncer
Previous Message Mark Lewis 2007-10-01 15:42:19 Re: pg jdbc and dbcp error