Re: wondering how prepared statements work?

"Greg Sabino Mullane" <greg-738XdyZ4GzZWk0Htik3J/[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> I'm trying to put pg_bouncer between my app and postgres,

You'll need to turn off server side prepared queries entirely, as 
they are not compatible with something as low level as pg_bouncer.
Immediately after you connect, do this:

$dbh->{pg_server_prepare} = 0;

Works like a charm, I've been running a busy site using this for a while 
now with pg_bouncer. The gains from pg_bouncer outweigh the loss of 
prepared statements.

FWIW, the next version of DBD::Pg will mention this pg_bouncer workaround 
explicitly in the docs.

- --
Greg Sabino Mullane greg-738XdyZ4GzZWk0Htik3J/[email protected]
PGP Key: 0x14964AC8 200709272013
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFG/EdfvJuQZxSWSsgRA1ZdAKDN5+buaVBsam39k11P6SEDPKVTXACgjGux
YokqbvBW2rRk3vizQ923UMw=
=u5YY
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.