From 48bc3db6fa6cf1887dc789fb8561338e7a1e37f8 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 10 Nov 2010 16:51:36 +0200 Subject: [PATCH] Fix JDBC vs transaction pooling FAQ --- doc/faq.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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? == -- 2.50.1