FREEDOM251

Freedom251 › Database Proxy Software

PgBouncer

Free plan LinuxSelf-hostedWindows

Visit PgBouncer Alternatives Pricing

PgBouncer's own site

What PgBouncer is

PgBouncer is a free, self-hosted connection pooler for PostgreSQL. It reuses server connections to lessen the performance impact of repeatedly opening new ones, with session, transaction, and statement pooling modes. Statement pooling does not permit multi-statement transactions. PgBouncer can route connections to destination databases on different hosts, and can track protocol-level prepared statements in transaction and statement modes when max_prepared_statements is non-zero. Documented authentication options include client certificates, SCRAM-SHA-256, LDAP, PAM, and HBA-based configuration. The features page lists default memory requirements of 2 kB per connection. It does not provide internal multi-host load balancing or failover detection; its FAQ describes DNS round-robin or external load balancers for distribution, and DNS changes or external tools for failover. Source releases are available, with references to OS packages and RPM and Debian repositories. Building requires Libevent 2.0 or later, pkg-config, and a C11-capable compiler; OpenSSL is needed for TLS support.

Who it suits

PgBouncer suits PostgreSQL operators who can run and build self-hosted software. It may fit setups that need connection pooling but can handle load balancing and failover separately.

What it does well

  • Free source release for self-hosted use.
  • Offers session, transaction, and statement pooling.
  • Supports several documented authentication methods.
  • Can route to databases on different hosts.

What to know first

  • Statement pooling disallows multi-statement transactions.
  • No internal multi-host load balancing configuration.
  • No internal failover-host configuration or detection.
  • Windows builds require MinGW.

Plans

PlanBilled and limitsPrice
PgBouncerSource release available · self-hosted softwareFree

As pgbouncer.org lists them, read 3 Oct 2026. The maker's own page has the final word.

Getting started

  1. Visit the PgBouncer website and choose a source release or a listed OS package route.
  2. Prepare Libevent 2.0 or later, pkg-config and a C11-capable compiler if building from source.
  3. Add OpenSSL if you need TLS support.
  4. Choose session, transaction or statement pooling for your configuration.
  5. Configure a documented authentication method and destination database hosts.
  6. Use DNS or an external TCP load balancer for load distribution if needed.

PgBouncer is a self-hosted pooler for applications that use PostgreSQL. It is a strong fit for teams seeking to reuse database connections and manage the software themselves; its narrow focus makes it less suitable when balancing traffic or failover must be built in.

Overview

By reusing PostgreSQL server connections, PgBouncer reduces the performance impact of repeatedly opening new ones. It can route to destination databases on different hosts, but it does not distribute traffic across those hosts or detect failures. Teams that need either capability must handle it through DNS changes or external tools.

The project dates to 2007 and is distributed as source, with native operating-system packages and dedicated RPM and Debian repositories also offered. Version 1.26.0, released September 23, 2026, fixes three denial-of-service CVEs. Keeping deployments current is therefore an important operational consideration.

Key features

Pooling modes

Session, transaction, and statement pooling give operators different ways to reuse backend connections. Statement pooling disallows multi-statement transactions, which rules it out for applications that depend on them. Transaction and statement modes can track protocol-level prepared statements when max_prepared_statements is non-zero, offering support for that use without changing the restriction on multi-statement transactions.

Authentication and TLS

Authentication options include client certificates, SCRAM-SHA-256, LDAP, PAM, and HBA-based configuration. TLS support depends on building with OpenSSL 1.0.1 or later. This range of documented options suits deployments with varied authentication needs, while TLS adds a build dependency to account for.

Resource use and deployment

The documented default memory requirement is 2 kB per connection, a useful planning figure for connection-heavy deployments. Building requires Libevent 2.0 or later, pkg-config, and a C11-capable compiler; OpenSSL is needed for TLS. Optional integrations include PAM, LDAP, and systemd. Windows is supported, but MinGW is the only documented supported Windows build environment, a meaningful constraint for Windows operators.

Pricing

PgBouncer is free: the PgBouncer plan costs nothing and provides a source release for self-hosted use. There is no free trial because the software is free. This makes it a straightforward option for teams able to run and maintain their own deployment; the tradeoff is that the deployment model is self-hosted rather than a managed service.

Platforms

PgBouncer supports Linux and Windows and is self-hosted. Windows deployments have the additional build-environment constraint of MinGW. Source releases and native OS packages provide different installation paths, with dedicated RPM and Debian repositories also available.

Who it's for

PgBouncer suits PostgreSQL operators who want connection reuse, need to select among session, transaction, and statement pooling, and are prepared to manage a self-hosted tool. It is a weaker fit for applications requiring multi-statement transactions in statement mode, or for teams that expect the pooler itself to balance among backend hosts or handle failover.

Pros and cons

  • Pros: Three pooling modes let operators match connection reuse to workload needs.
  • Pros: Documented authentication choices include client certificates, SCRAM-SHA-256, LDAP, PAM, and HBA-based configuration.
  • Pros: Free self-hosted distribution and a stated default of 2 kB per connection make cost and memory planning more direct.
  • Cons: Statement pooling disallows multi-statement transactions, limiting its use with applications that rely on them.
  • Cons: There is no internal multi-host load balancing or failover detection, so those needs call for DNS changes or external tools.
  • Cons: Building requires several dependencies, and Windows builds are limited to MinGW.

Alternatives

For a broader directory of options, see Database Proxy Software.

  • MySQL is an alternative with a freemium model, a free plan, and a free trial.
  • OceanBase Database offers a free Community Edition described as an open-source distributed database with full kernel capabilities.
  • PgDog has a free open-source plan under AGPL-3.0 and a separate Enterprise plan.
  • pgagroal is a free, self-hosted PostgreSQL connection pool, suited to readers considering another tool in the same category.
  • PgDoorman is another free, self-hosted option.
  • ShardingSphere-Proxy offers a free open-source binary distribution with Docker and Helm deployment.
  • TiCDC is a free alternative for readers considering another database tool.
  • TurbineProxy offers a free Apache-2.0 open-source plan with no per-query fees.

Verdict

Choose PgBouncer if your priority is free, self-hosted PostgreSQL connection pooling with a choice of three modes. Its focused pooling role is the reason to choose it; the absence of built-in load balancing and failover is the reason to look elsewhere or pair it with other infrastructure.

Verdict

PgBouncer focuses on reusing PostgreSQL connections and offers three pooling modes. It does not handle internal multi-host load balancing or failover, so those needs require other approaches.

Questions

Is PgBouncer free?

Yes. PgBouncer is free, self-hosted software, and source releases are available.

Which database does PgBouncer support?

PgBouncer is a connection pooler for PostgreSQL.

Which pooling modes are available?

It supports session, transaction and statement pooling. Statement pooling disallows multi-statement transactions.

Does PgBouncer provide load balancing or failover?

It has no internal multi-host load-balancing configuration or failover-host detection. Its FAQ describes DNS reconfiguration and external tools for these needs.

Can PgBouncer run on Windows?

Windows operation is documented, and MinGW is its only supported Windows build environment.

What is needed to build PgBouncer?

Building requires Libevent 2.0 or later, pkg-config and a C11-capable compiler. OpenSSL is required for TLS support.

Facts from PgBouncer's own pages

Authentication
Documented authentication options include client certificates, SCRAM-SHA-256, LDAP, PAM, and HBA-based configuration. · pgbouncer.org, 3 Oct 2026
Backend hosts
PgBouncer can route to destination databases on different hosts and is not tied to one backend server. · pgbouncer.org, 3 Oct 2026
Build dependencies
Building requires Libevent 2.0 or later, pkg-config, and a C11-capable compiler; OpenSSL is needed for TLS support. · pgbouncer.org, 3 Oct 2026
Distribution
The downloads page offers source releases and points to native OS packages and dedicated RPM and Debian package repositories. · pgbouncer.org, 3 Oct 2026
Failover
PgBouncer does not provide internal failover-host configuration or detection; its FAQ describes DNS reconfiguration and external tools as options. · pgbouncer.org, 3 Oct 2026
Founded
2007 · pgbouncer.org, 28 Sept 2026
Integrations
Optional build integrations include PAM, LDAP, and systemd support. · pgbouncer.org, 3 Oct 2026
Load balancing
PgBouncer has no internal multi-host load-balancing configuration; its FAQ describes using DNS round-robin or an external TCP load balancer such as HAProxy or LVS. · pgbouncer.org, 3 Oct 2026
Memory
The features page lists default memory requirements of 2 kB per connection. · pgbouncer.org, 3 Oct 2026
Operating systems
The installation page documents running PgBouncer on Windows and specifies MinGW as its only supported Windows build environment. · pgbouncer.org, 3 Oct 2026
Pooling modes
It supports session, transaction, and statement pooling, with statement pooling disallowing multi-statement transactions. · pgbouncer.org, 3 Oct 2026
Prepared statements
It can track protocol-level prepared statements in transaction and statement pooling when max_prepared_statements is non-zero. · pgbouncer.org, 3 Oct 2026
Purpose
PgBouncer is a PostgreSQL connection pooler that reuses server connections to reduce the performance impact of opening new connections. · pgbouncer.org, 3 Oct 2026
Release and security
The homepage says version 1.26.0, released September 23, 2026, fixes three denial-of-service CVEs. · pgbouncer.org, 3 Oct 2026
TLS
The installation documentation lists OpenSSL 1.0.1 or later as a build dependency for TLS support. · pgbouncer.org, 3 Oct 2026

Where PgBouncer stands on Freedom251

Look at these too