2025-12-03 - PgBouncer 1.25.1 - "Fixing a bunch of bugs before Christmas"
Fix CVE-2025-12819: Before this release it was possible for an unauthenticated attacker to execute arbitrary SQL during authentication by providing a malicious search_path parameter in the StartupMessage. Systems that have ALL the following configurations are vulnerable:
track_extra_parameters includes search_path (non-default configuration, probably only configured in setups involving Citus or PostgreSQL 18)auth_user is set to a non-empty string (non-default configuration)auth_query is configured without fully-qualified object names (default configuration, the < operator is not schema qualified)Fixes
2025-11-09 - PgBouncer 1.25.0 - "The one with LDAP support"
auth_ldap_options. (#731)SHOW CLIENTS. (#1191)transaction_timeout setting, both globally and at the user level. (#1242)query_wait_notify. (#1264)scram_iterations setting to allow operators to trade security for authentication speed (#1339)client_tls13_ciphers and server_tls13_ciphers to choose which TLSv1.3 cipher suites to enable. (#1352)KILL to not take any database, which now means to KILL all databases. (#1317)SELECT 1. (#1233)RELOAD command now reports any errors that happened during the reload. (#1231)KILL_CLIENT for stuck connections. (#1305)mkauth.py to not add an obsolete third field anymore (#1365)FATAL messages in disconnect_client and disconnect_server functions. (#1382)EVP_PKEY_get0_EC_KEY. This could cause issues with certain FIPS implementatinos. (#1384)server_tls_sslmode=verify-full. (#1303)FATAL error when forwarding cancel requests. (#1383)SHOW CONFIG. (#1403)2025-04-16 - PgBouncer 1.24.1 - "CVE-2025-2291 VALID UNTIL yesterday"
Fix CVE-2025-2291: Previously PgBouncer did not take into account the VALID UNTIL of a user password when querying for password hashes using its auth_query. So if PgBouncer is used as a transparent proxy in front of Postgres it could allow passwords that had already expired. To solve this issue the default auth_query and the examples of custom auth_query functions in the documentation have been changed to take VALID UNTIL into account. If you are using a custom auth_query you should update that accordingly. If you are using the default auth_query, you can either update to PgBouncer 1.24.1 or change your config to use the new default auth_query on a previous release of PgBouncer.
Fixes
pam authentication support in HBA file. (#1291) (bug introduced in 1.24.0)test_load_balance_hosts.py to the tarball. (#1282)Fix issues with tests to allow them to be run by Debian packagers. (#1266, #1250)
Docs
auth_query example to set a safe search_path. (#1245)2025-01-10 - PgBouncer 1.24.0 - "New year, new bouncer"
Type=notify-reload for systemd. This requires systemd
version 253 or later. (#1148)KILL_CLIENT command to the admin console. This allows terminating a
client connection by force. (#1147)max_user_client_connections setting, both globally and at the user level. (#1137)max_db_client_connections setting, both globally and at the database level. (#1138)current_client_connections counter to SHOW USERS and SHOW DATABASES output. (#1137, #1138)load_balance_hosts parameter, to support not load balancing between hosts. (#736)SHOW STATS. (#1192)client_idle_timeout setting. (#1189)query_timeout and reserve_pool_size. (#1180, #1228)Enable pam authentication support in HBA file. (#326)
Changes
max_prepared_statements is
now set to 200 by default. This change in defaultls should only impact
clients that actually use prepared statements. If you do use prepared
statements it's recommended to read about the limitations of the prepared
statement support in our documentation (#1144)server_login_retry failure. (#1152)auth_query. (#1187)default_pool_size to 0 means unlimited size. (#1227)Change the name of the reserve_pool setting for databases, to
reserve_pool_size. The previous name is still an alias for the new name.
(#1232)
Fixes
server_tls_sslmode in sample config file. (#1133)server_tls_protocols. (#1155)auth_query and replication connections together. This
bug would cause connection failures in such setups. (#1166)2024-08-02 - PgBouncer 1.23.1 - "Everything is put back in order"
2024-07-03 - PgBouncer 1.23.0 - "Into the new beginnings"
so_reuseport.
This is a minor breaking change. If you relied on the old behaviour of
SIGTERM in your Dockerfile or Systemd service file you should now use SIGQUIT.
(#902)cert and peer authentication
methods. This feature provides the flexibility that the user initiating
the connection does not have to be the database user. PgBouncer support
for user name maps works very similar to the postgres with the exceptions
listed in the docs. (#996)Add support for replication connections through PgBouncer. (#876)
Changes
SHOW USERS output listing the connections. (#1040)pool_size configuration per user. (#1049)server_lifetime configuration per database. (#1057)SHOW USERS. (#1052)all address type in hba configuration. (#1078)Increase c-ares minimum version requirement to 1.9.0 (#1076)
Fixes
--config=value format in options startup parameter. (#1064)avg_wait_time metric calculation. (#727)auth_query. (#1034)2024-03-04 - PgBouncer 1.22.1 - "It's summer in Bangalore"
COPY FROM STDIN queries. Such
queries could introduce memory leaks, performance regressions and prepared
statement misbehavior. (#1025)
(bug introduced in 1.21.0)2024-01-31 - PgBouncer 1.22.0 - "DEALLOCATE ALL"
DEALLOCATE ALL and DISCARD ALL when
max_prepared_statements is set to a non-zero value (normal DEALLOCATE
is still unsupported) (#972)Support configuring auth_query per database (#979)
Changes
Multiple documentation improvements
Fixes
SET DateStyle='ISO' for
every transaction (#879)application_name (#999)2023-10-16 - PgBouncer 1.21.0 - "The one with prepared statements"
Add support for protocol-level named prepared statements! This is probably
one of the most requested features for PgBouncer. Using prepared statements
together with PgBouncer can reduce the CPU load on your system a lot (both
at the PgBouncer side and the PostgreSQL side). In synthetic benchmarks
this feature was able to increase query throughput anywhere from 15% to
250%, depending on the workload. To benefit from this new feature you need
to change the new max_prepared_statements setting to a non-zero value
(the exact value depends on your workload, but 100 is probably reasonable).
See the docs on
max_prepared_statements
for details on how the feature works, its limitations, and how to tune the
value. After doing that you need to make sure your client library
actually uses prepared statements. How to do that differs for each client,
so you should look at the docs for the client you're using. This feature
has been tested very well before releasing, but performance issues or
bugs might very well exist due to the complexity of the feature. If you
find those, please report them. (#845)
Changes
min_pool_size for pools with a forced user even if no clients
are connected to PgBouncer (#947)The way a peer_id is encoded in the cancellation token by PgBouncer has
changed, this means that peering between different PgBouncer versions will
not work if not all of them are on the same side of the v1.21.0 version
boundary. (#945)
Fixes
Use auto-database when database in auth_dbname is not explicitly configured
(#921)
Cleanup
2023-08-09 - PgBouncer 1.20.1 - "Optional options"
options inside ignore_startup_parameters
would not ignore unknown parameters inside the options startup parameter
anymore. (#908) (regression was introduced in 1.20.0)2023-07-20 - PgBouncer 1.20.0 - "A funny name goes here"
Online restart option is now considered deprecated. The feature has
received very little love in recent years. There are multiple known issues
with it and newly added features often don't support it. The recommended
method to do online restarts these days is using the so_reuseport and
peers feature. That way you can have multiple different PgBouncer
processes running on the same port. Then by restarting those processes
one-by-one, you can make sure there's always a PgBouncer process listening
on the desired port. (#894)
Features
track_extra_parameters which allows tracking of more
parameters in transaction pooling mode. Previously, PgBouncer only tracked
application_name, DateStyle, TimeZone and
standard_conforming_strings. Now PgBouncer also tracks IntervalStyle by
default. And by changing track_extra_parameters you can track even more
settings, but only ones that PostgreSQL reports back to the
client. If you're using Citus 12.0+, then Citus will make sure
that PostgreSQL also reports search_path back to the client. So if you use
Citus you can add search_path to the track_extra_parameters setting.
(#867)server_tls_sslmode to prefer. (#866)Add support for the options startup parameter. This allows usage of the
PGOPTIONS environment variable that psql and libpq know
about. Using this variable you can set any PostgreSQL parameter at
startup. This only works for PostgreSQL parameters that PgBouncer tracks
through track_extra_parameters. (#878)
Fixes
pgbouncer admin database is used as auth_dbname. It's
still not supported, but this now gives a clear error instead of crashing.
(#817)peer_cache in SHOW MEM. It was incorrectly showing up as
db_cache before. (#864)log_connections is set
to 1. (#883)2023-05-31 - PgBouncer 1.19.1 - "Sunny Spring"
This is a minor release that fixes a few recently introduced bugs:
2023-05-04 - PgBouncer 1.19.0 - "The old-fashioned, human-generated kind"
auth_dbname option, which specifies against which database
to run the auth_query. (#764)SHOW STATE command, which shows if PgBouncer is active,
paused or suspended. (#528)cancel_wait_timeout setting, which determines
after how long to give up on forwarding a cancel request. Default
is 10 seconds. (#833)New testing framework (#792)
Fixes
disconnect_server on a server in BEING_CANCELED
state. (#815) (introduced in 1.18.0)SIGTERM is
received. (#834)unix_socket_dir. (#830)listen_addr could be listened on. (#838)Give more warning messages with more information when
sbuf_connect fails. This is especially useful when failing to
create Unix sockets. (#837)
Cleanups
2022-12-12 - PgBouncer 1.18.0 - "No real mystery"
application_name to SHOW CLIENTS/SERVERS/SOCKETS
output (#449)Add information about cancel requests to SHOW
CLIENTS/SERVERS/POOLS output
(#782)
Fixes
sbuf_send_pending operation if destination socket is closed
(#652)min_pool_size
(#648)SHOW HELP with PostgreSQL 15
(#769)Fix race condition in query cancellation handling. It was possible that a query cancellation for one client canceled a query for another one. This could happen when a cancel request was received by PgBouncer when the query it was meant to cancel already completed by itself. (#717)
Cleanups
2022-03-23 - PgBouncer 1.17.0 - "A line has been drawn"
auth_file reload. The auth_file is now
reread only on configuration file reload, no longer automatically
as soon as it is changed.The Windows builds created on CI are now statically linked, so they can be used directly without requiring any dependencies.
Fixes
auth_type in sample pgbouncer.ini to md5 to match the
built-in default. Some deploy this file as the default
configuration file, so check if this changed configuration still
makes sense for you.tcp_defer_accept documentation and behavior. The
documentation was incorrect and misleading about the default. In
some cases the wrong value was showing in "show config". Also, if
it's set but not supported, give an error instead of ignoring,
similar to how other platform-specific socket options are handled.Fix build with c-ares on Windows. c-ares >=1.18.0 is now required on Windows.
Cleanups
python3 by default. Python 2
compatibility is no longer maintained.command -v instead of which, which
is deprecated.make check now works on Windows (but not the SSL test suite
yet).2021-11-11 - PgBouncer 1.16.1 - "Test of depth against quiet efficiency"
This is a minor release with a security fix.
A man-in-the-middle with the ability to inject data into the TCP connection could stuff some cleartext data into the start of a supposedly encryption-protected database session. This could be abused to send faked SQL commands to the server, although that would only work if PgBouncer did not demand any authentication data. (However, a PgBouncer setup relying on SSL certificate authentication might well not do so.) (CVE-2021-3935)
2021-08-09 - PgBouncer 1.16.0 - "Fended off a jaguar"
@ to use a socket in the abstract
namespace. This matches the corresponding PostgreSQL 14 feature.The number of pending query cancellations is shown in SHOW
POOLS.
Fixes
Fix reloading of default_pool_size, min_pool_size, and
res_pool_size. Reloading these settings previously didn't work.
Cleanups
2020-11-19 - PgBouncer 1.15.0 - "Ich hab noch einen Koffer in Berlin"
SHOW CONFIG now also shows the default values of the settings.
Fixes
so_reuseport option on FreeBSD. The original code in
PgBouncer 1.12.0 didn't actually work on FreeBSD.
(#504)Fix the behavior of the global auth_user setting. The old
behavior was confusing and fragile as it depended on the order in
the configuration file. This is no longer the
case. (#391,
#393)
Cleanups
2020-06-11 - PgBouncer 1.14.0 - "La ritrovata magia"
userlist.txt or
from auth_query) for logging into servers./var/run/postgresql is
restricted.Add support for Unix-domain sockets on Windows.
Cleanups
pgbouncer-minimal.ini for testing or deployment.2020-04-27 - PgBouncer 1.13.0 - "My favourite game"
tcp_user_timeout, to set the
corresponding socket option.client_tls_protocols and server_tls_protocols now default to
secure, which means only TLS 1.2 and TLS 1.3 are enabled. Older
versions are still supported, they are just not turned on by
default.Add support for systemd service notifications. Right now, this
allows using Type=notify service units. More integration is
planned for future versions.
Fixes
Handle null user names returned from auth_query properly
(#340)
Cleanups
debian have been removed. It
is recommended to use the packages from https://apt.postgresql.org/.USE_SUDO.2019-10-17 - PgBouncer 1.12.0 - "It's about learning and getting better"
This release contains a variety of minor enhancements and fixes.
SO_REUSEPORT socket option. On
some operating systems, this allows running multiple PgBouncer
instances on the same host listening on the same port and having
the kernel distribute the connections automatically.resolv.conf file separate from the
operating system. This allows setting custom DNS servers and
perhaps other DNS options.Send the output of SHOW VERSION as a normal result row instead
of a NOTICE message. This makes it easier to consume and is
consistent with other SHOW commands.
Fixes
numeric instead of bigint. This
avoids some client libraries failing on values that overflow the
bigint
range. (#360,
#401)Fix compilation with newer versions of musl-libc (used by Alpine Linux).
Cleanups
make check target. This allows running all the tests from a
single command.2019-08-27 - PgBouncer 1.11.0 - "Instinct for Greatness"
scram-sha-256 is added.auth_type=password when the stored password is md5, like
a PostgreSQL server
would. (#129)log_stats to disable printing stats to
log. (#287)-Werror.auth_user. This would either
crash or report garbage values for wait
time. (#393)[users] section and add to example
config
file. (#330)2019-07-01 - PgBouncer 1.10.0 - "Afraid of the World"
SHOW FDS
(#311).idle_transaction_timeout calculation
(#125). The
bug would lead to premature timeouts in specific situations.2018-08-13 - PgBouncer 1.9.0 - "Chaos Survival"
2017-12-20 - PgBouncer 1.8.1 - "Ground-and-pound Mentality"
include/pam.h into distribution tarball. This
prevented the 1.8 tarball from building at all.2017-12-19 - PgBouncer 1.8 - "Confident at the Helm"
--with-pam.)paused and disabled fields to SHOW DATABASES output.maxwait_us field to SHOW POOLS output.wait and wait_us fields to SHOW commands output.SHOW STATS_TOTALS and SHOW STATS_AVERAGES.SHOW STATS. The
fields total_requests, avg_req, and
avg_query have been replaced by new fields.wait_time to SHOW STATS.pg_hba.conf, keep parsing after erroneous lines instead of rejecting the whole file.
(#118)auth_user setting is now also allowed globally, not only per database.
(#142)UTF8.2016-02-26 - PgBouncer 1.7.2 - "Finally Airborne"
2016-02-18 - PgBouncer 1.7.1 - "Forward To Five Friends Or Else"
WARNING: Since version 1.7, server_reset_query is not executed when
database is in transaction-pooling mode. Seems this was not highlighted
enough in 1.7 announcement. If your apps depend on that happening, use
server_reset_query_always to restore previous behaviour.
Otherwise main work of this release was to track down TLS-related memory leak, which turned out to not exist. Instead there is libssl build in Debian/wheezy which has 600k overhead per connection (without leaking) instead expected 20-30k. Something to keep an eye on when using TLS.
client_tls_sslmode=verify-ca/-full now reject
connections without client certificate.
(#104)client_tls_sslmode=allow/require do validate client
certificate if sent. Previously they left cert validation
unconfigured so connections with client cert failed.
(#105)--without-openssl) build.
(#101)server_reset_query documentation.
(#110)2015-12-18 - PgBouncer 1.7 - "Colors Vary After Resurrection"
query_wait_timeout to 120s by default. Current default
(0) causes infinite queueing, which is not useful. That
means if client has pending query and has not been
assigned to server connection, the client connection will
be dropped.server_reset_query_always by default. Now reset
query is used only in pools that are in session mode.2015-09-03 - PgBouncer 1.6.1 - "Studio Audience Approves"
New setting: server_reset_query_always. When set,
disables server_reset_query use on non-session pools.
PgBouncer introduces per-pool pool_mode, but session-pooling
and transaction-pooling should not use same reset query.
In fact, transaction-pooling should not use any reset query.
It is set in 1.6.x, but will be disabled in 1.7.
Fixes
[SECURITY] Remove invalid assignment of auth_user. (#69)
When auth_user is set and client asks non-existing username,
client will log in as auth_user. Not good.
Skip NoticeResponse in handle_auth_response. Otherwise verbose log levels on server cause login failures.
console: Fill auth_user when auth_type=any. Otherwise
logging can crash (#67).
Various portability fixes (OpenBSD, Solaris, OSX).
2015-08-01 - PgBouncer 1.6 - "Zombies of the future"
Features
Load user password hash from postgres database. New parameters:
auth_user user to use for connecting same db and fetching user info. Can be set per-database too.
auth_query SQL query to run under auth_user. Default: "SELECT usename, passwd FROM pg_shadow WHERE usename=$1"
(Cody Cutrer)
Pooling mode can be configured both per-database and per-user. (Cody Cutrer)
Per-database and per-user connection limits: max_db_connections and max_user_connections. (Cody Cutrer / Pavel Stehule)
Add DISABLE/ENABLE commands to prevent new connections. (William Grant)
New DNS backend: c-ares. Only DNS backend that supports all interesting features: /etc/hosts with refresh, SOA lookup, large replies (via TCP/EDNS+UDP), IPv6. It is the preferred backend now, and probably will be only backend in the future, as it's pointless to support zoo of inadequate libraries.
SNAFU: c-ares versions <= 1.10 have bug which breaks CNAME-s support when IPv6 has been enabled. (Fixed upstream.) As a workaround, c-ares <= 1.10 is used IPv4-only. So PgBouncer will drop other backends only when c-ares >1.10 (still unreleased) has been out some time...
Show remote_pid in SHOW CLIENTS/SERVERS. Available for clients that connect over unix sockets and both tcp and unix socket server. In case of tcp-server, the pid is taken from cancel key.
Add separate config param (dns_nxdomain_ttl) for controlling negative dns caching. (Cody Cutrer)
Add the client host IP address and port to application_name. This is enabled by a config parameter application_name_add_host which defaults to 'off'. (Andrew Dunstan)
Config files have '%include FILENAME' directive to allow configuration to be split into several files. (Andrew Dunstan)
Cleanups
log: wrap ipv6 address with []
Fix spelling mistakes in log messages and comments. (Dmitriy Olshevskiy)
Fixes
fix launching new connections during maintenance (Cody Cutrer)
2015-04-09 - PgBouncer 1.5.5 - "Play Dead To Win"
2012-11-28 - PgBouncer 1.5.4 - "No Leaks, Potty-Training Successful"
2012-09-12 - PgBouncer 1.5.3 - "Quantum Toaster"
Critical fix
Too long database names can lead to crash, which is remotely triggerable if autodbs are enabled.
The original checks assumed all names come from config files, thus using fatal() was fine, but when autodbs are enabled - by '*' in [databases] section - the database name can come from network thus making remote shutdown possible.
Minor Features
max_packet_size - config parameter to tune maximum packet size that is allowed through. Default is kept same: (2G-1), but now it can be made smaller.
In case of unparsable packet header, show it in hex in log and error message.
Fixes
AntiMake: it used $(relpath) and $(abspath) to manipulate pathnames, but the result was build failure when source tree path contained symlinks. The code is now changed to work on plain strings only.
2012-05-29 - PgBouncer 1.5.2 - "Don't Chew, Just Swallow"
2012-04-17 - PgBouncer 1.5.1 - "Abort, Retry, Ignore?"
2012-01-05 - PgBouncer 1.5 - "Bouncing Satisfied Clients Since 2007"
If you use more than 8 IPs behind one DNS name, you now need to use EDNS0 protocol to query. Only getaddrinfo_a()/getaddrinfo() and UDNS backends support it, libevent 1.x/2.x does not. To enable it for libc, add 'options edns0' to /etc/resolv.conf.
GNU Make 3.81+ is required for building.
2011-06-16 - PgBouncer 1.4.2 - "Strike-First Algorithm"
Affected OS-es: *BSD, Solaris, Win32.
2011-04-01 - PgBouncer 1.4.1 - "It Was All An Act"
Features
Support listening/connect for IPv6 addresses. (Hannu Krosing)
console: Send PgBouncer version as 'server_version' to client.
Important Fixes
Disable getaddrinfo_a() on glibc < 2.9 as it crashes on older versions.
Notable affected OS'es: RHEL/CentOS 5.x (glibc 2.5), Ubuntu 8.04 (glibc 2.7). Also Debian/lenny (glibc 2.7) which has non-crashing getaddrinfo_a() but we have no good way to detect it.
Please use libevent 2.x on such OS'es, fallback getaddrinfo_a() is not meant for production systems. And read new 'DNS lookup support' section in README to see how DNS backend is picked.
(Hubert Depesz Lubaczewski, Dominique Hermsdorff, David Sommerseth)
Default to --enable-evdns if libevent 2.x is used.
Turn on tcp_keepalive by default, as that's what Postgres also does. (Hubert Depesz Lubaczewski)
Set default server_reset_query to DISCARD ALL to be compatible with Postgres by default.
win32: Fix crashes with NULL unix socket addr. (Hiroshi Saito)
Fix autodb cleanup: old cleanup code was mixing up databases and pools: as soon as one empty pool was found, the database was tagged as 'idle', potentially later killing database with active users.
Reported-By: Hubert Depesz Lubaczewski
Fixes
Make compat getaddrinfo_a() non-blocking, by using single parallel thread to do lookups.
2011-01-11 - PgBouncer 1.4 - "Gore Code"
Features
Async DNS lookup - instead of resolving hostnames at reload time, the names are now resolved at connect time, with configurable caching. (See dns_max_ttl parameter.)
By default it uses getaddrinfo_a() (glibc) as backend, if it does not exist, then getaddrinfo_a() is emulated via blocking(!) getaddrinfo().
When --enable-evdns argument to configure, libevent's evdns is used as backend. It is not used by default, because libevent 1.3/1.4 contain buggy implementation. Only evdns in libevent 2.0 seems OK.
New config var: syslog_ident, to tune syslog name.
Proper support for application_name startup parameter.
Command line long options (Guillaume Lelarge)
Solaris portability fixes (Hubert Depesz Lubaczewski)
New config var: disable_pqexec. Highly-paranoid environments can disable Simple Query Protocol with that. Requires apps that use only Extended Query Protocol.
Postgres compat: if database name is empty in startup packet, use user name as database.
Fixes
DateStyle and TimeZone server params need to use exact case.
Console: send datetime, timezone and stdstr server params to client.
Internal cleanups
Use libusual library for low-level utility functions.
2010-09-09 - PgBouncer 1.3.4 - "Bouncer is always right"
2010-05-10 - PgBouncer 1.3.3 - "NSFW"
2010-03-15 - PgBouncer 1.3.2 - "Boomerang Bullet"
Fixes
New config var 'query_wait_timeout'. If client does not get server connection in this many seconds, it will be killed.
If no server connection in pool and last connect failed, then don't put client connections on hold but send error immediately.
This together with previous fix avoids unnecessary stalls if a database has gone down.
Track libevent state in sbuf.c to avoid double event_del(). Although it usually is safe, it does not seem to work 100%. Now we should always know whether it has been called or not.
Disable maintenance during SUSPEND. Otherwise with short timeouts the old bouncer could close few connections after sending them over.
Apply client_login_timeout to clients waiting for welcome packet (first server connection). Otherwise they can stay waiting infinitely, unless there is query_timeout set.
win32: Add switch -U/-P to -regservice to let user pick account to run service under. Old automatic choice between Local Service and Local System was not reliable enough.
console: Remove \0 from end of text columns. It was hard to notice, as C clients were fine with it.
Documentation improvements. (Greg Sabino Mullane)
Clarify few login-related log messages.
Change logging level for pooler-sent errors (usually on disconnect) from INFO to WARNING, as they signify problems.
Change log message for query_timeout to "query timeout".
2009-07-06 - PgBouncer 1.3.1 - "Now fully conforming to NSA monitoring requirements"
2009-02-18 - PgBouncer 1.3 - "New Ki-Smash Finishing Move"
Features
IANA has assigned port 6432 to be official port for PgBouncer. Thus the default port number has changed to 6432. Existing individual users do not need to change, but if you distribute packages of PgBouncer, please change the package default to official port.
Dynamic database creation (David Galoyan)
Now you can define database with name "*". If defined, it's connect string will be used for all undefined databases. Useful mostly for test / dev environments.
Windows support (Hiroshi Saito)
PgBouncer runs on Windows 2000+ now. Command line usage stays same, except it cannot run as daemon and cannot do online reboot. To run as service, define parameter service_name in config. Then:
> pgbouncer.exe config.ini -regservice
> net start SERVICE_NAME
To stop and unregister:
> net stop SERVICE_NAME
> pgbouncer.exe config.ini -unregservice
To use Windows Event Log, event DLL needs to be registered first:
> regsrv32 pgbevent.dll
Afterwards you can set "syslog = 1" in config.
Minor features
Database names in config file can now be quoted with standard SQL ident quoting, to allow non-standard characters in db names.
New tunables: 'reserve_pool_size' and 'reserve_pool_timeout'. In case there are clients in pool that have waited more that 'reserve_pool_timeout' seconds, 'reserve_pool_size' specifies the number of connections that can be added to pool. It can also set per-pool with 'reserve_pool' connection variable.
New tunable 'sbuf_loopcnt' to limit time spent on one socket.
In some situations - eg SMP server, local Postgres and fast network - pgbouncer can run recv()->send() loop many times without blocking on either side. But that means other connections will stall for a long time. To make processing more fair, limit the times of doing recv()->send() one socket. If count reaches limit, just proceed processing other sockets. The processing for that socket will resume on next event loop.
Thanks to Alexander Schöcke for report and testing.
crypt() authentication is now optional, as it was removed from Postgres. If OS does not provide it, pgbouncer works fine without it.
Add milliseconds to log timestamps.
Replace old MD5 implementation with more compact one.
Update ISC licence with the FSF clarification.
Fixes
In case event_del() reports failure, just proceed with cleanup. Previously pgbouncer retried it, in case the failure was due ENOMEM. But this has caused log floods with infinite repeats, so it seems libevent does not like it.
Why event_del() report failure first time is still mystery.
--enable-debug now just toggles whether debug info is stripped from binary. It no longer plays with -fomit-frame-pointer as it's dangerous.
Fix include order, as otherwise system includes could come before internal ones. Was problem for new md5.h include file.
Include COPYRIGHT file in .tgz...
2008-08-08 - PgBouncer 1.2.3 - "Carefully Selected Bytes"
Thanks to Devrim GÜNDÜZ and Bjoern Metzdorf for problem reports and testing.
2008-08-06 - PgBouncer 1.2.2 - "Barf-bag Included"
2008-08-04 - PgBouncer 1.2.1 - "Waterproof"
2008-07-29 - PgBouncer 1.2 - "Ordinary Magic Flute"
PgBouncer 1.2 now requires libevent version 1.3b or newer. Older libevent versions crash with new restart code.
Features
Command line option (-u) and config parameter (user=) to support user switching at startup. Also now pgbouncer refuses to run as root.
(Jacob Coby)
More descriptive usage text (-h). (Jacob Coby)
New database option: connect_query to allow run a query on new connections before they are taken into use.
(Teodor Sigaev)
New config var 'ignore_startup_parameters' to allow and ignore extra parameters in startup packet. By default only 'database' and 'user' are allowed, all others raise error. This is needed to tolerate overenthusiastic JDBC wanting to unconditionally set 'extra_float_digits=2' in startup packet.
Logging to syslog: new parameters syslog=0/1 and syslog_facility=daemon/user/local0.
Less scary online restart (-R)
Move FD loading before fork, so it logs to console and can be canceled by ^C
Keep SHUTDOWN after fork, so ^C would be safe
A connect() is attempted to unix socket to see if anyone is listening. Now -R can be used even when no previous process was running. If there is previous process, but -R is not used, startup fails.
New console commands:
SHOW TOTALS that shows stats summary (as goes to log) plus mem usage.
SHOW ACTIVE_SOCKETS - like show sockets; but filter only active ones.
Less visible features
suspend_timeout - drop stalled conns and long logins. This brings additional safety to reboot.
When remote database throws error on logging in, notify clients.
Removing a database from config and reloading works - all connections are killed and the database is removed.
Fake some parameters on console SHOW/SET commands to be more Postgres-like. That was needed to allow psycopg to connect to console. (client_encoding/default_transaction_isolation/datestyle/timezone)
Make server_lifetime=0 disconnect server connection immediately after first use. Previously "0" made PgBouncer ignore server age. As this behavior was undocumented, there should not be any users depending on it.
Internal improvements:
Packet buffers are allocated lazily and reused. This should bring huge decrease in memory usage. This also makes realistic to use big pktbuf with lot of connections.
Lot's of error handling improvements, PgBouncer should now survive OOM situations gracefully.
Use slab allocator for memory management.
Lots of code cleanups.
Fixes
Only single accept() was issued per event loop which could cause connection backlog when having high amount of connection attempts. Now the listening socket is always drained fully, which should fix this.
2007-12-10 - PgBouncer 1.1.2 - "The Hammer"
2007-10-26 - PgBouncer 1.1.1 - "Breakdancing Bee"
2007-10-09 - PgBouncer 1.1 - "Mad-Hat Toolbox"
Features
Keep track of following server parameters:
client_encoding datestyle, timezone, standard_conforming_strings
Database connect string enhancements:
New config var: server_reset_query, to be sent immediately after release
Local connection endpoint info in SHOW SERVERS/CLIENTS/SOCKETS.
Code cleanup
More debug log messages include socket info.
Wrapper struct for current pkt info. Removes lot of compexity.
Fixes
Detect invalid pkt headers better.
2007-06-18 - PgBouncer 1.0.8 - "Undead Shovel Jutsu"
2007-04-19 - PgBouncer 1.0.7 - "With Vitamin A-Z"
2007-04-12 - PgBouncer 1.0.6 - "Daily Dose"
2007-04-11 - PgBouncer 1.0.5 - "Enough for today"
2007-04-11 - PgBouncer 1.0.4 - "Last 'last' bug"
2007-04-11 - PgBouncer 1.0.3 - "Fearless Fork"
Create core when Assert() triggers.
New stuff
2007-03-28 - PgBouncer 1.0.2 - "Supersonic Spoon"
2007-03-15 - PgBouncer 1.0.1 - "Alien technology"
Delay server release until everything is guaranteed to be sent.
Features
2007-03-13 - PgBouncer 1.0 - "Tuunitud bemm"