PgBouncer sits between PostgreSQL applications and the database server, reusing server connections to reduce the cost of opening new ones. The key configuration decision is pool_mode: session pooling preserves a client’s server connection until disconnect, while transaction pooling releases it at transaction end and therefore requires an application that does not depend on unsupported session state. Choose a mode first, budget backend connections across all active pools, then validate the live configuration and application behavior before rollout.
Choose a pooling mode that matches your application
PgBouncer’s pooling mode determines when a PostgreSQL server connection is returned to the pool. The three modes differ in compatibility, reuse opportunities, and transaction constraints; none guarantees a performance improvement for every workload.
| Mode | When the server connection is returned | Compatibility and constraints |
|---|---|---|
| Session | When the client disconnects | Supports all PostgreSQL features, according to the feature documentation. Since a connection remains assigned for the full client session, an idle but connected client may limit reuse. |
| Transaction | When the current transaction ends | Allows server connections to be reused between client transactions, but session-scoped state may not persist. Audit compatibility before adopting it. |
| Statement | After each query | Does not allow multi-statement transactions, making it the most restrictive mode. |
These lifecycle definitions and compatibility boundaries are documented in PgBouncer’s configuration reference, feature matrix, and usage guide. Session mode is the compatibility-first option; transaction mode is appropriate only when the application and its drivers tolerate transaction-scoped server assignments. Statement mode is for clients that can operate one query at a time without multi-statement transactions.
Audit transaction-pooling compatibility
Transaction pooling is an application contract, not simply a transparent setting change. Because a client may receive a different server connection in a later transaction, state attached to one server session cannot be assumed to survive. Check PgBouncer’s current compatibility matrix and audit the application’s actual SQL and driver behavior.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Session-dependent features to investigate
SETandRESETsession state.LISTENlisteners and session-level advisory locks.- Holdable cursors and SQL
PREPARE/DEALLOCATE. - Temporary tables whose state persists across commits, including
PRESERVE ROWSandDELETE ROWSbehavior. LOADand any application assumptions about session state.
Behaviors the matrix distinguishes
The feature matrix lists NOTIFY, cursors without WITH HOLD, ON COMMIT DROP temporary tables, and cached plan reset as compatible with transaction pooling. It marks the session-dependent items above as incompatible. Startup parameters have a supported subset, including client_encoding, DateStyle, IntervalStyle, Timezone, standard_conforming_strings, and application_name; PgBouncer’s configuration documents ways to extend or ignore startup-parameter tracking.
Search application code and database access layers for the listed behaviors, then test with the exact PgBouncer, PostgreSQL, and client-library versions intended for production. Include transaction boundaries and code paths that rely on connection reuse in staging.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Configure protocol-level prepared statements carefully
Named protocol-level prepared statements can work in transaction and statement pooling when max_prepared_statements is nonzero. PgBouncer’s FAQ says this support has been available since version 1.21.0. The setting limits the active least-recently-used cache per server connection; PgBouncer can share identical query strings through internal names. See the configuration reference and FAQ.
Client-library behavior matters. The FAQ’s compatibility notes say PHP/PDO support depends on versions, and describe PHP 8.4 or later with libpq 17 as required for the compatibility addressed there. For older combinations, it recommends upgrading or disabling prepared statements client-side. For JDBC, it identifies prepareThreshold=0 as a way to disable prepared statements. Check the current FAQ and the versions actually deployed before relying on those specifics.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Test prepared queries through the intended pooling mode, including around schema changes. If a prepared query’s parameter or result types change, PostgreSQL can report “cached plan must not change result type.” PgBouncer’s configuration documentation describes RECONNECT from the admin console as one way to force re-preparation after a migration.
Set pool limits from a backend connection budget
There is no universal pool-size value established by PgBouncer’s documentation. A defensible limit starts with the number of PostgreSQL connections the server can allocate to application work after reserving capacity for administration, replication, and headroom. Then account for how PgBouncer creates pools across databases and users.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Capacity-planning sequence
- Establish the server budget. Decide how many PostgreSQL connections are available for application traffic without consuming capacity reserved for other work or operational headroom.
- Model the pools. Count the database/user pools the deployment will actually use and compare their configured caps with the backend budget. Include reserve capacity in the model rather than treating it as free.
- Bound both sides. Set client limits to bound inbound concurrency and backend limits to constrain PostgreSQL connections. Relevant controls include
pool_size,reserve_pool_size,max_db_connections,max_user_connections,max_client_conn, and database- or user-specific client limits. - Check operating-system descriptors. The configuration reference warns that raising
max_client_connmay require a higher file-descriptor limit. The theoretical descriptor requirement can exceed the client limit because PgBouncer also holds server connections. - Tune against workload evidence. Measure queueing and PostgreSQL utilization under representative traffic, then adjust caps. PgBouncer’s cited documentation does not establish a generally optimal pool size or quantify a guaranteed performance gain.
Global defaults can be overridden per database or per user. Review the complete pool topology and the configuration reference before setting limits; a per-pool value is not necessarily the total backend ceiling across the deployment.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Deploy and validate with PgBouncer’s admin console
The basic setup is to define database mappings and authentication, start PgBouncer, and point the application at PgBouncer’s listener. For operations, connect to the special virtual pgbouncer database. The usage guide documents the quick start and administrative commands.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
- Connect to the virtual
pgbouncerdatabase using an account allowed to administer PgBouncer. - Run
SHOW HELPto see commands available in the running version. - Use
SHOW CONFIGto inspect effective settings, including mode and caps;SHOW DATABASESto review mappings; andSHOW POOLS,SHOW CLIENTS, andSHOW SERVERSto inspect pool and connection state. - After changing configuration, use
RELOADwhere appropriate and verify the effective settings again. - During staging and rollout, compare client and server counts and observe whether clients are waiting for a server connection. Exercise transaction behavior, prepared statements, temporary tables, and any session-dependent features identified in the compatibility audit.
Keep a rollback path to session pooling available if transaction-mode testing exposes an incompatible application dependency. The appropriate rollout mechanics depend on topology and availability requirements.
Check the current release and security status
As of 2026-10-05, PgBouncer’s project homepage reports version 1.26.0, dated September 23, 2026. The release notes say it fixes three security issues: denial of service through a malformed SCRAM client-final message, an infinite loop caused by integer overflow in packet-buffer growth, and unbounded login work from a malicious PostgreSQL server’s SCRAM iteration count.
The same release adds default tracking for search_path and default_transaction_read_only, adds pool_idle_timeout, permits query_wait_timeout per user and database, and removes deprecated online restart (-R). These version details can change; check the official homepage and configuration or changelog pages when deploying.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors

