I am using PgBouncer in "transaction" mode for connection pooling. Our code already have PreparedStatements used at multiple places. Even though FAQ on PgBouncer https://www.pgbouncer.org/faq.html#how-to-use-prepared-statements-with-transaction-pooling suggests to use prepareThreshold=0 to disable preparedStatements , but in reality this does not work. Any solution to this ?
Asked
Active
Viewed 1,383 times
1 Answers
1
That's old question but I am going to answer it for reference.
Try also adding preparedStatementCacheQueries=0
to your JDBC connection string.
e.g. jdbc:postgresql://{0}:{1}/{2}?user={3}&password={4}&prepareThreshold=0&preparedStatementCacheQueries=0

efdestegul
- 617
- 3
- 6