From: Marko Kreen Date: Wed, 10 Nov 2010 14:51:36 +0000 (+0200) Subject: Fix JDBC vs transaction pooling FAQ X-Git-Tag: pgbouncer_1_4_rc3~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48bc3db6fa6cf1887dc789fb8561338e7a1e37f8;p=pgbouncer Fix JDBC vs transaction pooling FAQ --- diff --git a/doc/faq.txt b/doc/faq.txt index 6a0f236..fbd4d80 100644 --- a/doc/faq.txt +++ b/doc/faq.txt @@ -66,8 +66,16 @@ to keep track of them internally, which it does not do. So only way to keep using PgBouncer in this mode is to disable prepared statements completely. -For JDBC this seems to be achieved by adding `protocolVersion=2` -parameter to connect string. +The proper way to do it for JDBC is adding `prepareThreshold=0` +parameter to connect string. But current JDBC code ignores +the setting for BEGIN/COMMIT/ROLLBACK statements and still +tries to cache their plans. This can be fixed with following patch: + +http://treehou.se/~omar/postgresql-jdbc-8.4-701-pgbouncer_txn.patch[] + +described here: + +http://pgfoundry.org/pipermail/pgbouncer-general/2010-February/000507.html[] == How to upgrade PgBouncer without dropping connections? ==