The PostgreSQL JDBC Driver is now PgBouncer compliant

Three years ago a discussion was launched on the Pgbouncer mailing-list [1] about the JDBC Driver which does not disable prepared statements when using ?prepareThreshold=0 in the connection string.

At Clever Cloud, we provide PostgreSQL databases behind PgBouncer to handle pools of connections. And to optimize these pools, we use the transaction pooling mode. This mode will prevent clients from using prepared statements as the session is only used for one transaction.

To be able to use this mode internally we manually applied a patch to the driver. After 8 months of inactivity, the pull-request [2][3] was finally merged into the master branch of the driver.

Now we hope that the next version will be released soon.

References:

[1] http://lists.pgfoundry.org/pipermail/pgbouncer-general/2010-February/000507.html [2] https://github.com/pgjdbc/pgjdbc/pull/9 [3] https://github.com/pgjdbc/pgjdbc/pull/58

Blog

À lire également

Kubernetes in production: how to keep the standard without taking on all its operations

Kubernetes has become a standard for running containerised applications, structuring distributed architectures and integrating into cloud-native environments.
Company

Clever Cloud Takes Control of Its IP Prefix Announcements

Since January 22, 2025, Clever Cloud has been announcing its own IP prefixes on the Internet in our Paris region. We now manage this critical part of our network infrastructure internally, rather than delegating it to a third party.
Engineering

CKE in public beta: managed, sovereign, and properly integrated Kubernetes

Clever Cloud was founded in 2010. At that point, Docker did not exist, and Kubernetes even less. The problem, however, was already there: running our first customers' applications reliably, in isolation, and predictably.
Company Engineering Features