[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connecting PG via pgBouncer



Some other info: pgbouncer is on the webserver in a normal port (5432). So, from lsmb's point of view, pgbouncer just like a standard postgresql server.

I set lsmb to connect directly to the remote database, just to see, how it works: it is working fine, replication also working well (streaming replication), so, this could be a workaround until we can solve or drop pgbouncer.

So, regarding the pgbouncer, it seems the DBD::Pg, prepared statement and connections has issues, as wrote on cpan.org. Maybe there are some workarounds, I search the internet...

István


2013/11/2 Pongracz Istvan <..hidden..>
Ok,
It seems, the following happens:
" Programs such as PgBouncer which cache connections at a low level should not use prepared statements via DBD::Pg, or must take extra care in the application to account for the fact that prepared statements are not shared across database connections. "

I found it here: http://search.cpan.org/dist/DBD-Pg/Pg.pm

So, it seems, it will not work with pgbouncer transparently? 
It is sad, due to that, I successfully setup an environment with failover postgresql servers in HA environment, but the automated failover, which switch from died DB server to the hot standby server based on pgbouncer.

Any hint? Or forget it?

Cheers,
István



--
Utálom a google-t.
I hate google.