Softwr
PgBouncer logo

PgBouncer

Lightweight open-source connection pooler for PostgreSQL

PgBouncer is free to use. PgBouncer is an open-source connection pooler that sits between applications and PostgreSQL servers, reducing the number of server connections in use. Softwr lists it under Databases. PgBouncer is made by PgBouncer Authors, available on Linux, macOS, Windows.

Overview

What is PgBouncer?

PgBouncer is a connection pooler for PostgreSQL. It runs as a small proxy between applications and one or more PostgreSQL servers, so that many client connections can share a smaller number of real server connections. The project describes itself as lightweight, with a default memory use of about 2 kB per connection, and it can front databases that live on different hosts. It offers three pooling modes. Session pooling assigns a server connection for as long as the client stays connected and supports all PostgreSQL features. Transaction pooling assigns a connection only for the length of a transaction, and the project notes that several session-based features, such as SET and RESET, LISTEN, PREPARE and session-level advisory locks, are not available in that mode. Statement pooling is the most aggressive mode and disallows multi-statement transactions. Most settings can be reconfigured online, and the project documents an online restart and upgrade that keeps client connections open. It is aimed at database administrators and developers who run PostgreSQL themselves, or who add a pooler in front of a managed instance. PgBouncer is free to use and is built from source or installed from packages; it is configured through files rather than a graphical console. It is not a database, a high availability manager, a load balancer for read replicas or a monitoring product, and it supports PostgreSQL only.

What people use it for

  • Reducing open connections to a busy PostgreSQL server
  • Pooling connections from serverless or short-lived application processes
  • Fronting databases spread across several hosts
  • Rolling upgrades without dropping client connections

The honest half

Where does PgBouncer fall short?

The limits buyers hit most with PgBouncer: transaction pooling disables session features such as LISTEN, SET/RESET and session-level advisory locks; and configured through files and an admin console, with no built-in graphical interface. Each is concrete and checkable: the half of a review a vendor will not write.

  • Works with PostgreSQL only; it cannot pool connections for other database engines
  • Transaction pooling disables session features such as LISTEN, SET/RESET and session-level advisory locks
  • Windows support is limited to MinGW builds; Cygwin and Visual toolchains are not supported
  • Configured through files and an admin console, with no built-in graphical interface
  • Does not provide failover, replication management or read-replica load balancing

Cross-shopped

What are the alternatives to PgBouncer?

The closest alternatives to PgBouncer are Neon, Supabase and Aiven. Each is a tool buyers genuinely weigh against it, with the reason why.

  • PgBouncer vs Neon

    Neon: Managed serverless PostgreSQL; weigh it if you would rather not run your own pooler

  • PgBouncer vs Supabase

    Supabase: Hosted PostgreSQL platform where connection handling is run by the vendor, not by you

  • PgBouncer vs Aiven

    Aiven: Managed PostgreSQL service for teams that prefer a hosted database over self-run proxies

  • PgBouncer vs Amazon RDS

    Amazon RDS: Managed relational database on AWS, an option if you want the provider to run PostgreSQL

  • PgBouncer vs PostgreSQL

    PostgreSQL: The database PgBouncer fronts; its own connection limits apply when no pooler is used

Capabilities

What can PgBouncer do?

PgBouncer lists 9 features, including session pooling, transaction pooling and statement pooling.

  • Session pooling

  • Transaction pooling

  • Statement pooling

  • Low memory use per connection

  • Online reconfiguration of most settings

  • Online restart and upgrade without dropping clients

  • Backends on different hosts

  • TLS support via OpenSSL

  • systemd notify and socket activation

Answered, with sources

Questions people ask

Each answer names the page it came from, so you can check it rather than take our word for it.

What is PgBouncer used for?

PgBouncer is a lightweight connection pooler for PostgreSQL. It lets many client connections share fewer server connections, which lowers the load of holding many connections open.

Source
What pooling modes does PgBouncer support?

It supports session, transaction and statement pooling. Session pooling supports all PostgreSQL features, while transaction and statement pooling restrict some session-based features.

Source
Does PgBouncer run on Windows?

The project's build instructions support Windows only through MinGW. It states that Cygwin and Visual toolchains are not supported, and that LDAP is not supported on Windows.

Source
What do I need to build PgBouncer from source?

The README lists a C11-capable compiler, Libevent 2.0 or newer, pkg-config and, for TLS, OpenSSL 1.0.1 or newer. Optional components include c-ares, LDAP libraries and PAM libraries.

Source

Checked against

Sources

The pages the facts above were read from. Prices and limits change, so the vendor's own page is the final word.

Share

Keep looking

Where to go from PgBouncer

Best Databases software for

Compare PgBouncer with

Other Databases software

  • The open source Firebase alternative

    Free, then $25/mo10 researched notes
  • Open source relational database

    Free plan16 researched notes
  • Serverless Postgres for modern developers

    Free plan15 researched notes
  • Fully managed open source data infrastructure cloud

    Free plan16 researched notes
  • Database caching and optimization that reduces infrastructure costs 30-70%

    Free plan12 researched notes
  • Set up, operate, and scale a relational database in the cloud

    Free plan14 researched notes
  • MIT-licensed analytical SQL database that runs inside your process, with no server, no dependencies and one writer at a time.

    Free plan14 researched notes
  • The cloud-native distributed SQL database

    Free plan15 researched notes
  • High-performance messaging system for cloud-native applications

    Open source12 researched notes
  • Time-series database built on PostgreSQL for real-time analytics

    Free plan15 researched notes
  • Open-source vector database for scalable similarity search

    Free plan16 researched notes
  • Streaming database that maintains incremental materialised views in SQL instead of Flink jobs

    Free, then $0.227/hour13 researched notes
  • The real-time big data database compatible with Cassandra

    Free plan11 researched notes
  • Small, fast, self-contained SQL database engine

    Free plan11 researched notes
  • SQLite-lineage database platform for running very large numbers of small per-tenant databases, with an MIT-licensed engine.

    Free, then $4.99/mo13 researched notes
  • Distributed AI search platform for retrieval, ranking, and inference

    Free plan14 researched notes
  • Fast, cost-effective time series database for metrics

    Open source12 researched notes
  • MySQL and PostgreSQL-compatible relational database built for the cloud

    Free plan12 researched notes

Softwr does not host reviews and shows no star rating for PgBouncer, because a rating we did not collect is not ours to publish. What is here is the pricing and platform detail from the vendor’s own pages, limitations we could state concretely, and alternatives a reviewer confirmed people weigh against it. Tell us if any of it is wrong.

More on PgBouncer

Best Databases software alternatives

Globally distributed relational database with strong consistency and up to 99.999% availability

usage-based

Relational database for transactions, JSON and time-series data

quote

Open source distributed wide-column store modelled on Bigtable, running on Hadoop

open-source

Distributed NoSQL database for low-latency key-value, document, graph and vector workloads

freemium

Column-oriented analytical SQL database with in-database machine learning

quote

In-memory, column-oriented relational database from SAP for analytics and applications

quote

Windows desktop relational database and application builder from Microsoft

subscription

Multi-platform SQL client and database administration tool with a free open-source edition

open-source

Compare PgBouncer with alternatives