1 2009-07-06 - PgBouncer 1.3.1 - "Now fully conforming to NSA monitoring requirements"
5 * Fix problem with sbuf_loopcnt which could make connections hang.
6 If query or result length is nearby of multiple of (pktlen*sbuf_loopcnt)
7 [10k by default], it could stay waiting for more data which will not
10 * Make database reconfigure immediate. Currently old connections
11 could be reused after SIGHUP.
13 * Fix SHOW DATABASES which was broken due to column addition.
15 * Console access was disabled when "auth_mode=any" as pgbouncer dropped username.
16 Fix: if "auth_mode=any", allow any user to console as admin.
18 * Fix bad CUSTOM_ALIGN macro. Luckily it's unused if OS already
19 defines ALIGN macro thus seems the bug has not happened in wild.
21 * win32: call WSAStartup() always, not only in daemon mode
22 as config parsing wants to resolve hosts.
24 * win32: put quotes around config filename in service
25 cmdline to allow spaces in paths. Executable path
26 does not seem to need it due to some win32 magic.
28 * Add STATS to SHOW HELP text.
30 * doc/usage.txt: the time units in console results are in
31 microseconds, not milliseconds.
33 2009-02-18 - PgBouncer 1.3 - "New Ki-Smash Finishing Move"
37 * IANA has assigned port 6432 to be official port for PgBouncer.
38 Thus the default port number has changed to 6432. Existing
39 individual users do not need to change, but if you distribute
40 packages of PgBouncer, please change the package default
43 * Dynamic database creation (David Galoyan)
45 Now you can define database with name "*". If defined, it's connect
46 string will be used for all undefined databases. Useful mostly
47 for test / dev environments.
49 * Windows support (Hiroshi Saito)
51 PgBouncer runs on Windows 2000+ now. Command line usage stays same,
52 except it cannot run as daemon and cannot do online reboot.
53 To run as service, define parameter service_name in config. Then:
55 > pgbouncer.exe config.ini -regservice
56 > net start SERVICE_NAME
58 To stop and unregister:
60 > net stop SERVICE_NAME
61 > pgbouncer.exe config.ini -unregservice
63 To use Windows Event Log, event DLL needs to be registered first:
65 > regsrv32 pgbevent.dll
67 Afterwards you can set "syslog = 1" in config.
71 * Database names in config file can now be quoted with standard SQL
72 ident quoting, to allow non-standard characters in db names.
74 * New tunables: 'reserve_pool_size' and 'reserve_pool_timeout'.
75 In case there are clients in pool that have waited more that
76 'reserve_pool_timeout' seconds, 'reserve_pool_size' specifies
77 the number of connections that can be added to pool. It can also
78 set per-pool with 'reserve_pool' connection variable.
80 * New tunable 'sbuf_loopcnt' to limit time spent on one socket.
82 In some situations - eg SMP server, local Postgres and fast network -
83 pgbouncer can run recv()->send() loop many times without blocking
84 on either side. But that means other connections will stall for
85 a long time. To make processing more fair, limit the times
86 of doing recv()->send() one socket. If count reaches limit,
87 just proceed processing other sockets. The processing for
88 that socket will resume on next event loop.
90 Thanks to Alexander Schöcke for report and testing.
92 * crypt() authentication is now optional, as it was removed from Postgres.
93 If OS does not provide it, pgbouncer works fine without it.
95 * Add milliseconds to log timestamps.
97 * Replace old MD5 implementation with more compact one.
99 * Update ISC licence with the FSF clarification.
103 * In case event_del() reports failure, just proceed with cleanup.
104 Previously pgbouncer retried it, in case the failure was due ENOMEM.
105 But this has caused log floods with inifinite repeats, so it seems
106 libevent does not like it.
108 Why event_del() report failure first time is still mystery.
110 * --enable-debug now just toggles whether debug info is stripped from binary.
111 It no longer plays with -fomit-frame-pointer as it's dangerous.
113 * Fix include order, as otherwise system includes could come before
114 internal ones. Was problem for new md5.h include file.
116 * Include COPYRIGHT file in .tgz...
118 2008-08-08 - PgBouncer 1.2.3 - "Carefully Selected Bytes"
120 * Disable SO_ACCEPTFILTER code for BSDs which did not work.
121 * Include example etc/userlist.txt in tgz.
122 * Use '$(MAKE)' instead 'make' for recursion (Jørgen Austvik)
123 * Define _GNU_SOURCE as glibc is useless otherwise.
124 * Let the libevent 1.1 pass link test so we can later report "1.3b+ needed"
125 * Detect stale pidfile and remove it.
127 Thanks to Devrim GÜNDÜZ and Bjoern Metzdorf for problem reports and testing.
129 2008-08-06 - PgBouncer 1.2.2 - "Barf-bag Included"
131 * Remove 'drop_on_error', it was a bad idea. It was added as workaround
132 for broken plan cache behaviour in Postgres, but can cause damage
133 in common case when some queries always return error.
135 2008-08-04 - PgBouncer 1.2.1 - "Waterproof"
139 * New parameter 'drop_on_error' - if server throws error the connection
140 will not be reused but dropped after client finished with it. This is
141 needed to refresh plan cache. Automatic refresh does not work even in 8.3.
146 * SHOW SOCKETS/CLIENTS/SERVERS: Don't crash if socket has no buffer.
147 * Fix infinite loop on SUSPEND if suspend_timeout triggers.
151 * Use <sys/uio.h> for 'struct iovec'.
152 * Cancel shutdown (from SIGINT) on RESUME/SIGUSR2,
153 otherwise it will trigger on next PAUSE.
154 * Proper log message if console operation is canceled.
156 2008-07-29 - PgBouncer 1.2 - "Ordinary Magic Flute"
158 PgBouncer 1.2 now requires libevent version 1.3b or newer.
159 Older libevent versions crash with new restart code.
163 * Command line option (-u) and config parameter (user=) to support user
164 switching at startup. Also now pgbouncer refuses to run as root.
166 * More descriptive usage text (-h). (Jacob Coby)
167 * New database option: connect_query to allow run a query on new
168 connections before they are taken into use. (Teodor Sigaev)
169 * New config var 'ignore_startup_parameters' to allow and ignore
170 extra parameters in startup packet. By default only 'database'
171 and 'user' are allowed, all others raise error. This is needed
172 to tolerate overenthusiastic JDBC wanting to unconditionally
173 set 'extra_float_digits=2' in startup packet.
174 * Logging to syslog: new parameters syslog=0/1 and
175 syslog_facility=daemon/user/local0.
176 * Less scary online restart (-R)
177 - Move FD loading before fork, so it logs to console and can be canceled by ^C
178 - Keep SHUTDOWN after fork, so ^C would be safe
179 - A connect() is attempted to unix socket to see if anyone is listening.
180 Now -R can be used even when no previous process was running. If there
181 is previous process, but -R is not used, startup fails.
182 * New console commands:
183 - SHOW TOTALS that shows stats summary (as goes to log) plus mem usage.
184 - SHOW ACTIVE_SOCKETS - like show sockets; but filter only active ones.
186 = Less visible features =
188 * suspend_timeout - drop stalled conns and long logins. This brings
189 additional safety to reboot.
190 * When remote database throws error on logging in, notify clients.
191 * Removing a database from config and reloading works - all connections
192 are killed and the database is removed.
193 * Fake some parameters on console SHOW/SET commands to be more Postgres-like.
194 That was needed to allow psycopg to connect to console.
195 (client_encoding/default_transaction_isolation/datestyle/timezone)
196 * Make server_lifetime=0 disconnect server connection immediately
197 after first use. Previously "0" made PgBouncer ignore server age.
198 As this behavior was undocumented, there should not be any users
200 * Internal improvements:
201 - Packet buffers are allocated lazily and reused. This should bring
202 huge decrease in memory usage. This also makes realistic to use
203 big pktbuf with lot of connections.
204 - Lot's of error handling improvements, PgBouncer should now
205 survive OOM situations gracefully.
206 - Use slab allocator for memory management.
207 - Lots of code cleanups.
211 * Only single accept() was issued per event loop which could
212 cause connection backlog when having high amount of connection
213 attempts. Now the listening socket is always drained fully,
214 which should fix this.
215 * Handle EINTR from connect().
216 * Make configure.ac compatible with autoconf 2.59.
217 * Solaris compatibility fixes (Magne Mæhre)
219 2007-12-10 - PgBouncer 1.1.2 - "The Hammer"
223 * Disconnects because of server_lifetime are now separated by
224 (server_lifetime / pool_size) seconds. This avoids pgbouncer
225 causing reconnect floods.
229 * Online upgrade 1.0 -> 1.1 problems:
230 - 1.0 does not track server parameters, so they stay NULL
231 but 1.1 did not expect it and crashed.
232 - If server params are unknown, but client ones are set,
233 then issue a SET for them, instead complaining.
234 * Remove temp debug statements that were accidentally left
235 in code on INFO level, so they polluted logs.
236 * Unbroke debian/changelog
240 * reorder struct SBuf fields to get better alignment for buffer.
242 2007-10-26 - PgBouncer 1.1.1 - "Breakdancing Bee"
246 * Server parameter cache could stay uninitialized, which caused
247 unnecessary SET of them. This caused problem on 8.1 which
248 does not allow touching standard_conforming_strings.
249 (Thanks to Dimitri Fontaine for report & testing.)
252 * Include doc/fixman.py in .tgz.
254 2007-10-09 - PgBouncer 1.1 - "Mad-Hat Toolbox"
258 * Keep track of following server parameters:
260 client_encoding datestyle, timezone, standard_conforming_strings
262 * Database connect string enhancements:
263 - Accept hostname in host=
264 - Accept custom unix socket location in host=
265 - Accept quoted values: password=' asd''foo'
267 * New config var: server_reset_query, to be sent immidiately after release
268 * New config var: server_round_robin, to switch between LIFO and RR.
269 * Cancel pkt sent for idle connection does not drop it anymore.
270 * Cancel with ^C from psql works for SUSPEND / PAUSE.
271 * Print FD limits on startup.
272 * When suspending, try to hit packet boundary ASAP.
273 * Add 'timezone' to database parameters.
274 * Use longlived logfile fd. Reopened on SIGHUP / RELOAD;
275 * Local connection endpoint info in SHOW SERVERS/CLIENTS/SOCKETS.
279 * More debug log messages include socket info.
280 * Magic number removal and error message cleanup. (David Fetter)
281 * Wrapper struct for current pkt info. Removes lot of compexity.
285 * Detect invalid pkt headers better.
286 * auth_file modification check was broken, which made pgbouncer
289 2007-06-18 - PgBouncer 1.0.8 - "Undead Shovel Jutsu"
293 * Fix crash in cancel packet handling. (^C from psql)
297 * PAUSE <db>; RESUME <db>; works now.
298 * Cleanup of console command parsing.
299 * Disable expensive in-list assert check.
301 2007-04-19 - PgBouncer 1.0.7 - "With Vitamin A-Z"
303 * Several error/notice packets with send() blocking between
304 triggered assert. Fix it by removing flushing logic altogether.
305 As pgbouncer does not actively buffer anything, its not needed.
306 It was a remnant from the time when buffering was pushed to
307 kernel with MSG_MORE.
308 * Additionally avoid calling recv() logic when sending unblocks.
309 * List search code for admin_users and stats_users
310 mishandled partial finds. Fix it.
311 * Standardise UNIX socket peer UID finding to getpeereid().
313 2007-04-12 - PgBouncer 1.0.6 - "Daily Dose"
315 * The "Disable maintenance during the takeover" fix could
316 disable maintenance altogether. Fix it.
317 * Compilation fix for FreeBSD, <sys/ucred.h> requires <sys/param.h> there.
318 Thanks go to Robert Gogolok for report.
320 2007-04-11 - PgBouncer 1.0.5 - "Enough for today"
322 * Fix online-restart bugs:
323 - Set ->ready for idle servers.
324 - Remove obsolete code from use_client_socket()
325 - Disable maintenance during the takeover.
327 2007-04-11 - PgBouncer 1.0.4 - "Last 'last' bug"
329 * Notice from idle server tagged server dirty.
330 release_server() did not expect it. Fix it
333 2007-04-11 - PgBouncer 1.0.3 - "Fearless Fork"
337 * Some error handling was missing in login path, so dying
338 connection there could trigger asserts.
339 * Cleanup of asserts in sbuf.c to catch problems earlier.
340 * Create core when Assert() triggers.
344 * New config vars: log_connections, log_disconnections,
345 log_pooler_errors to turn on/off noise.
346 * Config var: client_login_timeout to kill dead connections
347 in login phase that could stall SUSPEND and thus online restart.
349 2007-03-28 - PgBouncer 1.0.2 - "Supersonic Spoon"
351 * libevent may report a deleted event inside same loop.
352 Avoid socket reuse for one loop.
353 * release_server() from disconnect_client() didnt look
354 it the packet was actually sent.
356 2007-03-15 - PgBouncer 1.0.1 - "Alien technology"
360 * Mixed usage of cached and non-cached time, plus unsiged usec_t typedef
361 created spurious query_timeout errors.
362 * Fix rare case when socket woken up from send-wait could stay stalling.
363 * More fair queueing of server connections. Before, a new query could
364 get a server connections before older one.
365 * Delay server release until everything is guaranteed to be sent.
369 * SHOW SOCKETS command to have detailed info about state state.
370 * Put PgSocket ptr to log, to help tracking one connection.
371 * In console, allow SELECT in place of SHOW.
372 * Various code cleanups.
374 2007-03-13 - PgBouncer 1.0 - "Tuunitud bemm"
376 * First public release.