]> granicus.if.org Git - pgbouncer/blob - NEWS
v1.6.1
[pgbouncer] / NEWS
1 2015-09-03  -  PgBouncer 1.6.1  -  "Studio Audience Approves"
2
3   = Features =
4
5     * New setting - server_reset_query_always.  When set,
6       disables server_reset_query use on non-session pools.
7       PgBouncer introduces per-pool pool_mode, but session-pooling
8       and transaction-pooling should not use same reset query.
9       In fact, transaction-pooling should not use any reset query.
10
11       It is set in 1.6.x, but will be disabled in 1.7.
12
13   = Fixes =
14
15     * [SECURITY]  Remove invalid assignment of `auth_user`. (#69)
16       When `auth_user` is set and client asks non-existing username,
17       client will log in as `auth_user`.  Not good.
18
19     * Skip NoticeResponce in handle_auth_response.  Otherwise verbose
20       log levels on server cause login failures.
21
22     * console: Fill `auth_user` when auth_type=any.  Otherwise
23       logging can crash (#67).
24
25     * Various portability fixes (OpenBSD, Solaris, OSX).
26
27 2015-08-01  -  PgBouncer 1.6  -  "Zombies of the future"
28
29   = Features =
30
31     * Load user password hash from postgres database.
32       New parameters:
33         auth_user - user to use for connecting same db and fetching user info.
34                     Can be set per-database too.
35         auth_query - SQL query to run under auth_user.
36              Default: "SELECT usename, passwd FROM pg_shadow WHERE usename=$1"
37
38       (Cody Cutrer)
39
40     * Pooling mode can be configured both per-database and per-user.
41       (Cody Cutrer)
42
43     * Per-database and per-user connection limits: max_db_connections and
44       max_user_connections.
45       (Cody Cutrer / Pavel Stehule)
46
47     * Add DISABLE/ENABLE commands to prevent new connections.
48       (William Grant)
49
50     * New DNS backend: c-ares.  Only DNS backend that supports all
51       interesting features:  /etc/hosts with refresh, SOA lookup,
52       large replies (via TCP/EDNS+UDP), IPv6.  It is the preferred
53       backend now, and probably will be *only* backend in the future,
54       as it's pointless to support zoo of inadequate libraries.
55
56       SNAFU: c-ares versions <= 1.10 have bug which breaks CNAME-s support
57       when IPv6 has been enabled.  (Fixed upstream.)  As a workaround,
58       c-ares <= 1.10 is used IPv4-only.  So PgBouncer will drop other backends
59       only when c-ares >1.10 (still unreleased) has been out some time...
60
61     * Show remote_pid in SHOW CLIENTS/SERVERS.  Available for clients that
62       connect over unix sockets and both tcp and unix socket server.
63       In case of tcp-server, the pid is taken from cancel key.
64
65     * Add separate config param (dns_nxdomain_ttl) for controlling
66       negative dns caching.
67       (Cody Cutrer)
68
69     * Add the client host IP address and port to application_name.
70       This is enabled by a config parameter application_name_add_host
71       which defaults to 'off'.
72       (Andrew Dunstan)
73
74     * Config files have '%include FILENAME' directive to allow configuration
75       to be split into several files.
76       (Andrew Dunstan)
77
78   = Cleanups =
79
80     * log: wrap ipv6 address with []
81
82     * log: On connect to server, show local ip and port
83
84     * win32: use gnu-style for long args: --foo
85
86     * Allow numbers in hostname, always try to parse with inet_pton
87
88     * Fix deallocate_all() in FAQ
89
90     * Fix incorrect keyword in example config file
91       (Magnus Hagander)
92
93     * Allow comments (with ';') in auth files.
94       (Guillaume Aubert)
95
96     * Fix spelling mistakes in log messages and comments.
97       (Dmitriy Olshevskiy)
98
99   = Fixes =
100
101     * fix launching new connections during maintenance
102       (Cody Cutrer)
103
104     * don't load auth file twice at boot
105       (Cody Cutrer)
106
107     * Proper invalidation for autodbs
108
109     * ipv6: Set IPV6_V6ONLY on listen socket.
110
111     * win32: Don't set SO_REUSEADDR on listen socket.
112
113     * Fix IPv6 address memcpy
114
115     * Fix cancellation of of waiting clients.
116       (Mathieu Fenniak)
117
118     * Small bug fix, must check calloc result
119       (Heikki Linnakangas)
120
121     * Add newline at the end of the PID file
122       (Peter Eisentraut)
123
124     * Don't allow new server connections when PAUSE <db> was issued.
125       (Petr Jelinek)
126
127     * Fix 'bad packet' during login when header is delayed.
128       (Michał Trojnara, Marko Kreen)
129
130     * Fix errors detected by Coverty.
131       (Euler Taveira)
132
133     * Disable server_idle_timeout when server count gets below min_pool (#60)
134       (Marko Kreen)
135
136
137 2012-11-28  -  PgBouncer 1.5.4  -  "No Leaks, Potty-Training Successful"
138
139   = Fixes =
140
141     * DNS: Fix memory leak in getaddrinfo_a() backend.
142
143     * DNS: Fix memory leak in udns backend.
144
145     * DNS: Fix stats calculation.
146
147     * DNS: Improve error message handling for getaddrinfo_a().
148
149     * Fix win32 compile.
150
151     * Fix compiler dependency support check in configure.
152
153     * Few documentation fixes.
154
155 2012-09-12  -  PgBouncer 1.5.3  -  "Quantum Toaster"
156
157   = Critical fix =
158
159     * Too long database names can lead to crash, which
160       is remotely triggerable if autodbs are enabled.
161
162       The original checks assumed all names come from config files,
163       thus using fatal() was fine, but when autodbs are enabled
164       - by '*' in [databases] section - the database name can come
165       from network thus making remote shutdown possible.
166
167   = Minor Features =
168
169     * max_packet_size - config parameter to tune maximum packet size
170       that is allowed through.  Default is kept same: (2G-1), but now
171       it can be made smaller.
172
173     * In case of unparseable packet header, show it in hex in log and
174       error message.
175
176   = Fixes =
177
178     * AntiMake: it used $(relpath) and $(abspath) to manupulate pathnames,
179       but the result was build failure when source tree path contained
180       symlinks.  The code is now changed to work on plain strings only.
181
182     * console: now SET can be used to set empty string values.
183
184     * config.txt: show that all timeouts can be set in floats.
185       This is well-hidden feature introduced in 1.4.
186
187 2012-05-29  -  PgBouncer 1.5.2  -  "Don't Chew, Just Swallow"
188
189   = Fixes =
190
191     * Due to mistake, reserve_pool_timeout was taken in microseconds,
192       not seconds, effectively activating reserve pool immediately
193       when pool got full.  Now use it as seconds, as was intended.
194       (Noticed by Keyur Govande)
195
196 2012-04-17  -  PgBouncer 1.5.1  -  "Abort, Retry, Ignore?"
197
198   = Features =
199
200     * Parameters to tune permissions on unix socket:
201       unix_socket_mode=0777, unix_socket_group=''.
202
203   = Fixes =
204
205     * Allow empty string for server-side variable - this is
206       needed to get "application_name" properly working, as it's
207       the only parameter that does not have server-side default.
208
209     * If connect string changes, require refresh of server parameters.
210       Previously PgBouncer continued with old parameters,
211       which breaks in case of Postgres upgrade.
212
213     * If autodb connect string changes, drop old connections.
214
215     * cf_setint: Use strtol() instead atoi() to parse integer config
216       parameters.  It allows hex, octal and better error detection.
217
218     * Use sigqueue() to detect union sigval existence - fixes
219       compilation on HPUX.
220
221     * Remove 'git' command from Makefile, it throws random errors
222       in case of plain-tarball build.
223
224     * Document stats_period parameter.  This tunes the period for
225       stats output.
226
227     * Require Asciidoc >= 8.4, seems docs are not compatible with
228       earlier versions anymore.
229
230     * Stop trying to retry on EINTR from close().
231
232 2012-01-05  -  PgBouncer 1.5  -  "Bouncing Satisified Clients Since 2007"
233
234   If you use more than 8 IPs behind one DNS name, you now need to
235   use EDNS0 protocol to query.  Only getaddrinfo_a()/getaddrinfo()
236   and UDNS backends support it, libevent 1.x/2.x does not.
237   To enable it for libc, add 'options edns0' to /etc/resolv.conf.
238
239   GNU Make 3.81+ is required for building.
240
241   = Features =
242
243     * Detect DNS reply changes and invalidate connections to IPs no longer
244       present in latest reply.
245       (Petr Jelinek)
246
247     * DNS zone serial based hostname invalidation.  When option
248       dns_zone_check_period is set, all DNS zones will be queried
249       for SOA, and when serial has changed, all hostnames
250       will be queried.  This is needed to get deterministic
251       connection invalidation, because invalidation on lookup
252       is useless when no lookups are performed.
253       Works only with new UDNS backend.
254
255     * New SHOW DNS_HOSTS, SHOW DNS_ZONES commands to examine DNS cache.
256
257     * New param: min_pool_size - avoids dropping all connections
258       when there is no load.
259       (Filip Rembiałkowski)
260
261     * idle_in_transaction_timeout - kill transaction if idle too long.
262       Not set by default.
263
264     * New libudns backend for DNS lookups.  More featureful than evdns.
265       Use --with-udns to activate.  Does not work with IPv6 yet.
266
267     * KILL command, to immediately kill all connections for one database.
268       (Michael Tharp)
269
270     * Move to Antimake build system to have better looking Makefiles.
271       Now GNU Make 3.81+ is required for building.
272
273   = Fixes =
274
275     * DNS now works with IPv6 hostnames.
276
277     * Don't change connection state when NOTIFY arrives from server.
278
279     * Various documentation fixes.
280       (Dan McGee)
281
282     * Console: Support ident quoting with "".  Originally we did not
283       have any commands that took database names, so no quoting was needed.
284
285     * Console: allow numbers at the stard of word regex.  Trying
286       to use strict parser makes things too complex here.
287
288     * Don't expire auto DBs that are paused.
289       (Michael Tharp)
290
291     * Create auto databases as needed when doing PAUSE.
292       (Michael Tharp)
293
294     * Fix wrong log message issued by RESUME command.
295       (Peter Eisentraut)
296
297     * When user= without password= is in database connect string,
298       password will be taken from userlist.
299
300     * Parse '*' properly in takeover code.
301
302     * autogen.sh: work with older autoconf/automake.
303
304     * Fix run-as-service crash on win32 due to bad basename() from
305       mingw/msvc runtime.  Now compat basename() is always used.
306
307 2011-06-16  -  PgBouncer 1.4.2  -  "Strike-First Algorithm"
308
309   Affected OS-es: *BSD, Solaris, Win32.
310
311   = Portability Fixes =
312
313     * Give CFLAGS to linker.  Needed when using pthread-based
314       getaddrinfo_a() fallback.
315
316     * lib/find_modules.sh: Replace split() with index()+substr().
317       This should make it work with older AWKs.
318
319     * <usual/endian.h>: Ignore system htoX/Xtoh defines.  There
320       may be only subset of macros defined.
321
322     * <usual/signal.h>: Separate compat sigval from compat sigevent
323
324     * <usual/socket.h>: Include <sys/uio.h> to get iovec
325
326     * <usual/time.h>: Better function autodetection on win32
327
328     * <usual/base_win32.h>: Remove duplicate sigval/sigevent declaration
329
330 2011-04-01  -  PgBouncer 1.4.1  -  "It Was All An Act"
331
332   = Features =
333
334     * Support listening/connect for IPv6 addresses.
335       (Hannu Krosing)
336
337     * Multiple listen addresses in 'listen_addr'.  For each getaddrinfo()
338       is called, so names can also be used.
339
340     * console: Send PgBouncer version as 'server_version' to client.
341
342   = Important Fixes =
343
344     * Disable getaddrinfo_a() on glibc < 2.9 as it crashes on older versions.
345
346       Notable affected OS'es: RHEL/CentOS 5.x (glibc 2.5), Ubuntu 8.04 (glibc 2.7).
347       Also Debian/lenny (glibc 2.7) which has non-crashing getaddrinfo_a()
348       but we have no good way to detect it.
349
350       Please use libevent 2.x on such OS'es, fallback getaddrinfo_a() is not
351       meant for production systems.  And read new 'DNS lookup support' section
352       in README to see how DNS backend is picked.
353
354       (Hubert Depesz Lubaczewski, Dominique Hermsdorff, David Sommerseth)
355
356     * Default to --enable-evdns if libevent 2.x is used.
357
358     * Turn on tcp_keepalive by default, as that's what Postgres also does.
359       (Hubert Depesz Lubaczewski)
360
361     * Set default server_reset_query to DISCARD ALL to be compatible
362       with Postgres by default.
363
364     * win32: Fix crashes with NULL unix socket addr.
365       (Hiroshi Saito)
366
367     * Fix autodb cleanup: old cleanup code was mixing up databases and pools
368       - as soon as one empty pool was found, the database was tagged as 'idle',
369       potentially later killing database with active users.
370
371       Reported-By: Hubert Depesz Lubaczewski
372
373   = Fixes =
374
375     * Make compat getaddrinfo_a() non-blocking, by using single parallel
376       thread to do lookups.
377
378     * Enable pthread compilation if compat getaddrinfo_a is used.
379
380     * release_server missed setting ->last_lifetime_disconnect on lifetime disconnect.
381       (Emmanuel Courreges)
382
383     * win32: fix auth file on DOS line endings - load_file() did not take
384       account of file shringage when loading.
385       (Rich Schaaf)
386
387     * <usual/endian.h>: add autoconf detection for enc/dec functions
388       so it would not create conflicts on BSD.
389       (James Pye)
390
391     * Don't crash when config file does not exist.
392       (Lou Picciano)
393
394     * Don't crash on DNS lookup failure when logging on noise level (-v -v).
395       (Hubert Depesz Lubaczewski, Dominique Hermsdorff)
396
397     * Use backticks instead of $(cmd) in find_modules.sh to make it more portable.
398       (Lou Picciano)
399
400     * Use 'awk' instead of 'sed' in find_modules.sh to make it more portable.
401       (Giorgio Valoti)
402
403     * Log active async DNS backend info on startup.
404
405     * Fix --disable-evdns to mean 'no' instead 'yes'.
406
407     * Mention in docs that -R requires unix_socket_dir.
408
409     * Discuss server_reset_query in faq.txt.
410
411     * Restore lost memset in slab allocator
412
413     * Various minor portability fixes in libusual.
414
415 2011-01-11  -  PgBouncer 1.4  -  "Gore Code"
416
417   = Features =
418
419     * Async DNS lookup - instead of resolving hostnames at reload time,
420       the names are now resolved at connect time, with configurable caching.
421       (See dns_max_ttl parameter.)
422
423       By default it uses getaddrinfo_a() (glibc) as backend, if it does not
424       exist, then getaddrinfo_a() is emulated via blocking(!) getaddrinfo().
425
426       When --enable-evdns argument to configure, libevent's evdns is used
427       as backend.  It is not used by default, because libevent 1.3/1.4
428       contain buggy implementation.  Only evdns in libevent 2.0 seems OK.
429
430     * New config var: syslog_ident, to tune syslog name.
431
432     * Proper support for `application_name` startup parameter.
433
434     * Command line long options (Guillaume Lelarge)
435
436     * Solaris portability fixes (Hubert Depesz Lubaczewski)
437
438     * New config var: disable_pqexec.  Highly-paranoid environments
439       can disable Simple Query Protocol with that.  Requires apps
440       that use only Extended Query Protocol.
441
442     * Postgres compat: if database name is empty in startup packet,
443       use user name as database.
444
445   = Fixes =
446
447     * DateStyle and TimeZone server params need to use exact case.
448
449     * Console: send datetime, timezone and stdstr server params to client.
450
451   = Internal cleanups =
452
453     * Use libusual library for low-level utility functions.
454
455     * Remove fixed-length limit from server params.
456
457 2010-09-09  -  PgBouncer 1.3.4  -  "Bouncer is always right"
458
459   = Fixes =
460
461     * Apply fast-fail logic at connect time.  So if server is failing,
462       the clients get error when connecting.
463
464     * Don't tag automatically generated databases for checking on reload time,
465       otherwise they get killed, because they don't exist in config.
466
467     * Ignore application_name parameter by default.  This avoids the need
468       for all Postgres 9.0 users to add it into ignore_startup_parameters=
469       themselves.
470
471     * Correct pg_auth quoting.  '\' is not used there.
472
473     * Better error reporting on console, show incoming query to user.
474
475     * Support OS'es (OpenBSD) where tv_sec is not time_t.
476
477     * Avoid too noisy warnings on gcc 4.5.
478
479 2010-05-10  -  PgBouncer 1.3.3  -  "NSFW"
480
481   = Improvements =
482
483     * Make listen(2) argument configurable: listen_backlog.  This is
484       useful on OS'es, where system max allowed is configurable.
485
486     * Improve disconnect messages to show what username or dbname caused
487       login to fail.
488
489   = Fixes =
490
491     * Move fast-fail relaunch logic around.  Old one was annoying in case of
492       permanently broken databases or users, by trying to retry even if
493       there is no clients who want to login.
494
495     * Make logging functions keep old errno, otherwise pgbouncer may act funny
496       on higher loglevels and logging problems.
497
498     * Increase the size of various startup-related buffers to handle
499       EDB more noisy startup.
500
501     * Detect V2 protocol startup request and give clear reason for disconnect.
502
503 2010-03-15  -  PgBouncer 1.3.2  -  "Boomerang Bullet"
504
505   = Fixes =
506
507     * New config var 'query_wait_timeout'.  If client does not get
508       server connection in this many seconds, it will be killed.
509
510     * If no server connection in pool and last connect failed, then
511       don't put client connections on hold but send error immediately.
512
513       This together with previous fix avoids unnecessary stalls if
514       a database has gone down.
515
516     * Track libevent state in sbuf.c to avoid double event_del().  Although
517       it usually is safe, it does not seem to work 100%.  Now we should always
518       know whether it has been called or not.
519
520     * Disable maintenance during SUSPEND.  Otherwise with short timeouts
521       the old bouncer could close few connections after sending them over.
522
523     * Apply client_login_timeout to clients waiting for welcome packet
524       (first server connection).  Otherwise they can stay waiting
525       infinitely, unless there is query_timeout set.
526
527     * win32: Add switch -U/-P to -regservice to let user pick account
528       to run service under.  Old automatic choice between Local Service and
529       Local System was not reliable enough.
530
531     * console: Remove \0 from end of text columns.  It was hard to notice,
532       as C clients were fine with it.
533
534     * Documentation improvements.  (Greg Sabino Mullane)
535
536     * Clarify few login-related log messages.
537
538     * Change logging level for pooler-sent errors (usually on disconnect) from INFO
539       to WARNING, as they signify problems.
540
541     * Change log message for query_timeout to "query timeout".
542
543 2009-07-06  -  PgBouncer 1.3.1  -  "Now fully conforming to NSA monitoring requirements"
544
545   = Fixes =
546
547     * Fix problem with sbuf_loopcnt which could make connections hang.
548       If query or result length is nearby of multiple of (pktlen*sbuf_loopcnt)
549       [10k by default], it could stay waiting for more data which will not
550       appear.
551
552     * Make database reconfigure immediate.  Currently old connections
553       could be reused after SIGHUP.
554
555     * Fix SHOW DATABASES which was broken due to column addition.
556
557     * Console access was disabled when "auth_mode=any" as pgbouncer dropped username.
558       Fix: if "auth_mode=any", allow any user to console as admin.
559
560     * Fix bad CUSTOM_ALIGN macro.  Luckily it's unused if OS already
561       defines ALIGN macro thus seems the bug has not happened in wild.
562
563     * win32: call WSAStartup() always, not only in daemon mode
564       as config parsing wants to resolve hosts.
565
566     * win32: put quotes around config filename in service
567       cmdline to allow spaces in paths.  Executable path
568       does not seem to need it due to some win32 magic.
569
570     * Add STATS to SHOW HELP text.
571
572     * doc/usage.txt: the time units in console results are in 
573       microseconds, not milliseconds.
574
575 2009-02-18  -  PgBouncer 1.3 -  "New Ki-Smash Finishing Move"
576
577   = Features =
578
579     * IANA has assigned port 6432 to be official port for PgBouncer.
580       Thus the default port number has changed to 6432.  Existing
581       individual users do not need to change, but if you distribute
582       packages of PgBouncer, please change the package default
583       to official port.
584
585     * Dynamic database creation (David Galoyan)
586
587       Now you can define database with name "*".  If defined, it's connect
588       string will be used for all undefined databases.  Useful mostly
589       for test / dev environments.
590
591     * Windows support (Hiroshi Saito)
592
593       PgBouncer runs on Windows 2000+ now.  Command line usage stays same,
594       except it cannot run as daemon and cannot do online reboot.
595       To run as service, define parameter service_name in config. Then:
596
597         > pgbouncer.exe config.ini -regservice
598         > net start SERVICE_NAME
599
600       To stop and unregister:
601
602         > net stop SERVICE_NAME
603         > pgbouncer.exe config.ini -unregservice
604
605       To use Windows Event Log, event DLL needs to be registered first:
606
607         > regsrv32 pgbevent.dll
608
609       Afterwards you can set "syslog = 1" in config.
610
611   = Minor features =
612
613     * Database names in config file can now be quoted with standard SQL
614       ident quoting, to allow non-standard characters in db names.
615
616     * New tunables: 'reserve_pool_size' and 'reserve_pool_timeout'.
617       In case there are clients in pool that have waited more that
618       'reserve_pool_timeout' seconds, 'reserve_pool_size' specifies
619       the number of connections that can be added to pool.  It can also
620       set per-pool with 'reserve_pool' connection variable.
621
622     * New tunable 'sbuf_loopcnt' to limit time spent on one socket.
623
624       In some situations - eg SMP server, local Postgres and fast network -
625       pgbouncer can run recv()->send() loop many times without blocking
626       on either side.  But that means other connections will stall for
627       a long time.  To make processing more fair, limit the times
628       of doing recv()->send() one socket.  If count reaches limit,
629       just proceed processing other sockets.  The processing for
630       that socket will resume on next event loop.
631
632       Thanks to Alexander Schöcke for report and testing.
633
634     * crypt() authentication is now optional, as it was removed from Postgres.
635       If OS does not provide it, pgbouncer works fine without it.
636
637     * Add milliseconds to log timestamps.
638
639     * Replace old MD5 implementation with more compact one.
640
641     * Update ISC licence with the FSF clarification.
642
643   = Fixes =
644
645     * In case event_del() reports failure, just proceed with cleanup.
646       Previously pgbouncer retried it, in case the failure was due ENOMEM.
647       But this has caused log floods with inifinite repeats, so it seems
648       libevent does not like it.
649
650       Why event_del() report failure first time is still mystery.
651
652     * --enable-debug now just toggles whether debug info is stripped from binary.
653       It no longer plays with -fomit-frame-pointer as it's dangerous.
654
655     * Fix include order, as otherwise system includes could come before
656       internal ones.  Was problem for new md5.h include file.
657
658     * Include COPYRIGHT file in .tgz...
659
660 2008-08-08  -  PgBouncer 1.2.3  -  "Carefully Selected Bytes"
661
662   * Disable SO_ACCEPTFILTER code for BSDs which did not work.
663   * Include example etc/userlist.txt in tgz.
664   * Use '$(MAKE)' instead 'make' for recursion (Jørgen Austvik)
665   * Define _GNU_SOURCE as glibc is useless otherwise.
666   * Let the libevent 1.1 pass link test so we can later report "1.3b+ needed"
667   * Detect stale pidfile and remove it.
668
669   Thanks to Devrim GÜNDÜZ and Bjoern Metzdorf for problem reports and testing.
670
671 2008-08-06  -  PgBouncer 1.2.2  -  "Barf-bag Included"
672
673   * Remove 'drop_on_error', it was a bad idea.  It was added as workaround
674     for broken plan cache behaviour in Postgres, but can cause damage
675     in common case when some queries always return error.
676
677 2008-08-04  -  PgBouncer 1.2.1  -  "Waterproof"
678
679   = Features =
680
681     * New parameter 'drop_on_error' - if server throws error the connection
682       will not be reused but dropped after client finished with it.  This is
683       needed to refresh plan cache.  Automatic refresh does not work even in 8.3.
684       Defaults to 1.
685
686   = Fixes =
687
688     * SHOW SOCKETS/CLIENTS/SERVERS: Don't crash if socket has no buffer.
689     * Fix infinite loop on SUSPEND if suspend_timeout triggers.
690
691   = Minor cleanups =
692
693     * Use <sys/uio.h> for 'struct iovec'.
694     * Cancel shutdown (from SIGINT) on RESUME/SIGUSR2,
695       otherwise it will trigger on next PAUSE.
696     * Proper log message if console operation is canceled.
697
698 2008-07-29  -  PgBouncer 1.2  -  "Ordinary Magic Flute"
699
700   PgBouncer 1.2 now requires libevent version 1.3b or newer.
701   Older libevent versions crash with new restart code.
702
703   = Features =
704
705     * Command line option (-u) and config parameter (user=) to support user
706       switching at startup.  Also now pgbouncer refuses to run as root.
707       (Jacob Coby)
708     * More descriptive usage text (-h).  (Jacob Coby)
709     * New database option: connect_query to allow run a query on new
710       connections before they are taken into use.  (Teodor Sigaev)
711     * New config var 'ignore_startup_parameters' to allow and ignore
712       extra parameters in startup packet.  By default only 'database'
713       and 'user' are allowed, all others raise error.  This is needed
714       to tolerate overenthusiastic JDBC wanting to unconditionally
715       set 'extra_float_digits=2' in startup packet.
716     * Logging to syslog: new parameters syslog=0/1 and
717       syslog_facility=daemon/user/local0.
718     * Less scary online restart (-R)
719       - Move FD loading before fork, so it logs to console and can be canceled by ^C
720       - Keep SHUTDOWN after fork, so ^C would be safe
721       - A connect() is attempted to unix socket to see if anyone is listening.
722         Now -R can be used even when no previous process was running.  If there
723         is previous process, but -R is not used, startup fails.
724     * New console commands:
725       - SHOW TOTALS that shows stats summary (as goes to log) plus mem usage.
726       - SHOW ACTIVE_SOCKETS - like show sockets; but filter only active ones.
727
728   = Less visible features =
729
730     * suspend_timeout - drop stalled conns and long logins. This brings
731       additional safety to reboot.
732     * When remote database throws error on logging in, notify clients.
733     * Removing a database from config and reloading works - all connections
734       are killed and the database is removed.
735     * Fake some parameters on console SHOW/SET commands to be more Postgres-like.
736       That was needed to allow psycopg to connect to console.
737       (client_encoding/default_transaction_isolation/datestyle/timezone)
738     * Make server_lifetime=0 disconnect server connection immediately
739       after first use.  Previously "0" made PgBouncer ignore server age.
740       As this behavior was undocumented, there should not be any users
741       depending on it.
742     * Internal improvements:
743       - Packet buffers are allocated lazily and reused.  This should bring
744         huge decrease in memory usage.  This also makes realistic to use
745         big pktbuf with lot of connections.
746       - Lot's of error handling improvements, PgBouncer should now
747         survive OOM situations gracefully.
748       - Use slab allocator for memory management.
749       - Lots of code cleanups.
750
751   = Fixes =
752
753     * Only single accept() was issued per event loop which could
754       cause connection backlog when having high amount of connection
755       attempts.  Now the listening socket is always drained fully,
756       which should fix this.
757     * Handle EINTR from connect().
758     * Make configure.ac compatible with autoconf 2.59.
759     * Solaris compatibility fixes (Magne Mæhre)
760
761 2007-12-10  -  PgBouncer 1.1.2  -  "The Hammer"
762
763   = Features =
764
765     * Disconnects because of server_lifetime are now separated by
766       (server_lifetime / pool_size) seconds.  This avoids pgbouncer
767       causing reconnect floods.
768
769   = Fixes =
770
771     * Online upgrade 1.0 -> 1.1 problems:
772       - 1.0 does not track server parameters, so they stay NULL
773         but 1.1 did not expect it and crashed.
774       - If server params are unknown, but client ones are set,
775         then issue a SET for them, instead complaining.
776     * Remove temp debug statements that were accidentally left
777       in code on INFO level, so they polluted logs.
778     * Unbroke debian/changelog
779
780   = Cleanup =
781
782     * reorder struct SBuf fields to get better alignment for buffer.
783
784 2007-10-26  -  PgBouncer 1.1.1  -  "Breakdancing Bee"
785
786   = Fixes =
787
788   * Server parameter cache could stay uninitialized, which caused
789     unnecessary SET of them.  This caused problem on 8.1 which
790     does not allow touching standard_conforming_strings.
791     (Thanks to Dimitri Fontaine for report & testing.)
792
793   * Some doc fixes.
794   * Include doc/fixman.py in .tgz.
795
796 2007-10-09  -  PgBouncer 1.1  -  "Mad-Hat Toolbox"
797
798   = Features =
799
800   * Keep track of following server parameters:
801
802       client_encoding  datestyle, timezone, standard_conforming_strings
803
804   * Database connect string enhancements:
805     - Accept hostname in host=
806     - Accept custom unix socket location in host=
807     - Accept quoted values: password=' asd''foo'
808
809   * New config var: server_reset_query, to be sent immidiately after release
810   * New config var: server_round_robin, to switch between LIFO and RR.
811   * Cancel pkt sent for idle connection does not drop it anymore.
812   * Cancel with ^C from psql works for SUSPEND / PAUSE.
813   * Print FD limits on startup.
814   * When suspending, try to hit packet boundary ASAP.
815   * Add 'timezone' to database parameters.
816   * Use longlived logfile fd.  Reopened on SIGHUP / RELOAD;
817   * Local connection endpoint info in SHOW SERVERS/CLIENTS/SOCKETS.
818
819   = Code cleanup =
820
821   * More debug log messages include socket info.
822   * Magic number removal and error message cleanup. (David Fetter)
823   * Wrapper struct for current pkt info.  Removes lot of compexity.
824
825   = Fixes =
826
827   * Detect invalid pkt headers better.
828   * auth_file modification check was broken, which made pgbouncer
829     reload it too often.
830
831 2007-06-18  -  PgBouncer 1.0.8  -  "Undead Shovel Jutsu"
832
833   = Fixes =
834
835   * Fix crash in cancel packet handling. (^C from psql)
836
837   = Features =
838
839   * PAUSE <db>; RESUME <db>; works now.
840   * Cleanup of console command parsing.
841   * Disable expensive in-list assert check.
842
843 2007-04-19  -  PgBouncer 1.0.7  -  "With Vitamin A-Z"
844
845   * Several error/notice packets with send() blocking between
846     triggered assert.  Fix it by removing flushing logic altogether.
847     As pgbouncer does not actively buffer anything, its not needed.
848     It was a remnant from the time when buffering was pushed to
849     kernel with MSG_MORE.
850   * Additionally avoid calling recv() logic when sending unblocks.
851   * List search code for admin_users and stats_users
852     mishandled partial finds.  Fix it.
853   * Standardise UNIX socket peer UID finding to getpeereid().
854
855 2007-04-12  -  PgBouncer 1.0.6  -  "Daily Dose"
856
857   * The "Disable maintenance during the takeover" fix could
858     disable maintenance altogether.  Fix it.
859   * Compilation fix for FreeBSD, <sys/ucred.h> requires <sys/param.h> there.
860     Thanks go to Robert Gogolok for report.
861
862 2007-04-11  -  PgBouncer 1.0.5  -  "Enough for today"
863
864   * Fix online-restart bugs:
865     - Set ->ready for idle servers.
866     - Remove obsolete code from use_client_socket()
867     - Disable maintenance during the takeover.
868
869 2007-04-11  -  PgBouncer 1.0.4  -  "Last 'last' bug"
870
871   * Notice from idle server tagged server dirty.
872     release_server() did not expect it.  Fix it
873     by dropping them.
874
875 2007-04-11  -  PgBouncer 1.0.3  -  "Fearless Fork"
876
877   = Fixes =
878
879   * Some error handling was missing in login path, so dying
880     connection there could trigger asserts.
881   * Cleanup of asserts in sbuf.c to catch problems earlier.
882   * Create core when Assert() triggers.
883
884   = New stuff =
885
886   * New config vars: log_connections, log_disconnections,
887     log_pooler_errors to turn on/off noise.
888   * Config var: client_login_timeout to kill dead connections
889     in login phase that could stall SUSPEND and thus online restart.
890
891 2007-03-28  -  PgBouncer 1.0.2  -  "Supersonic Spoon"
892
893   * libevent may report a deleted event inside same loop.
894     Avoid socket reuse for one loop.
895   * release_server() from disconnect_client() didnt look
896     it the packet was actually sent.
897
898 2007-03-15  -  PgBouncer 1.0.1  -  "Alien technology"
899
900   = Fixes =
901
902   * Mixed usage of cached and non-cached time, plus unsiged usec_t typedef
903     created spurious query_timeout errors.
904   * Fix rare case when socket woken up from send-wait could stay stalling.
905   * More fair queueing of server connections.  Before, a new query could
906     get a server connections before older one.
907   * Delay server release until everything is guaranteed to be sent.
908
909   = Features =
910
911   * SHOW SOCKETS command to have detailed info about state state.
912   * Put PgSocket ptr to log, to help tracking one connection.
913   * In console, allow SELECT in place of SHOW.
914   * Various code cleanups.
915
916 2007-03-13  -  PgBouncer 1.0  -  "Tuunitud bemm"
917
918   * First public release.
919