Main new features:
- Load user password hash from postgres database.
- Pooling mode can be configured both per-database and per-user.
- Per-database and per-user connection limits:
max_db_connections
andmax_user_connections
. - Add DISABLE/ENABLE commands to prevent new connections.
- New preferred DNS backend: c-ares.
- Config files have
%include FILENAME
directive to allow configuration to be split into several files.
The full changelog:
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 parameterapplication_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)
Fixes
-
fix launching new connections during maintenance (Cody Cutrer)
-
don’t load auth file twice at boot (Cody Cutrer)
-
Proper invalidation for autodbs
-
ipv6: Set
IPV6_V6ONLY
on listen socket. -
win32: Don’t set
SO_REUSEADDR
on listen socket. -
Fix IPv6 address memcpy
-
Fix cancellation of of waiting clients. (Mathieu Fenniak)
-
Small bug fix, must check calloc result (Heikki Linnakangas)
-
Add newline at the end of the PID file (Peter Eisentraut)
-
Don’t allow new server connections when PAUSE
was issued. (Petr Jelinek) -
Fix ‘bad packet’ during login when header is delayed. (Michał Trojnara, Marko Kreen)
-
Fix errors detected by Coverty. (Euler Taveira)
-
Disable
server_idle_timeout
when server count gets belowmin_pool
(#60) (Marko Kreen)
Cleanups
-
log: wrap ipv6 address with []
-
log: On connect to server, show local ip and port
-
win32: use gnu-style for long args: –foo
-
Allow numbers in hostname, always try to parse with inet_pton
-
Fix deallocate_all() in FAQ
-
Fix incorrect keyword in example config file (Magnus Hagander)
-
Allow comments (with ‘;’) in auth files. (Guillaume Aubert)
-
Fix spelling mistakes in log messages and comments. (Dmitriy Olshevskiy)