+2007-04-11 - PgBouncer 1.0.5 - "Enough for today"
+
+ * Fix online-restart bugs:
+ - Set ->ready for idle servers.
+ - Remove obsolete code from use_client_socket()
+ - Disable maintenance during the takeover.
+
2007-04-11 - PgBouncer 1.0.4 - "Last 'last' bug"
* Notice from idle server tagged server dirty.
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(pgbouncer, 1.0.4)
+AC_INIT(pgbouncer, 1.0.5)
AC_CONFIG_SRCDIR(src/bouncer.h)
AC_CONFIG_HEADER(config.h)
+pgbouncer (1.0.5-1) unstable; urgency=low
+
+ * fix online restart bugs.
+
+ -- Marko Kreen <marko.kreen@skype.net> Wed, 11 Apr 2007 13:50:50 +0300
+
pgbouncer (1.0.4-1) unstable; urgency=low
* last bug, honestly.
PgPool *pool;
int active = 0;
+ /* dont touch anything if takeover is in progress */
+ if (cf_reboot)
+ return;
+
statlist_for_each(item, &pool_list) {
pool = container_of(item, PgPool, head);
if (pool->admin)
List *item;
PgPool *pool;
+ /* dont touch anything if takeover is in progress */
+ if (cf_reboot)
+ return;
+
statlist_for_each(item, &pool_list) {
pool = container_of(item, PgPool, head);
if (pool->admin)
static void handle_sigint(int sock, short flags, void *arg)
{
log_info("Got SIGINT, shutting down");
+ if (cf_reboot)
+ fatal("Takeover was in progress, going down immidiately");
cf_pause_mode = P_PAUSE;
cf_shutdown = 1;
}
const char *dbname, const char *username,
uint64 ckey, int oldfd, int linkfd)
{
- PgDatabase *db = find_database(dbname);
- PgUser *user = find_user(username);
- PgPool *pool = get_pool(db, user);
PgSocket *client;
PktBuf tmp;
- if (!pool)
- return false;
-
client = accept_client(fd, NULL, addr->is_unix);
client->addr = *addr;
client->suspended = 1;
server->connect_time = server->request_time = get_cached_time();
server->query_start = 0;
- if (linkfd)
+ if (linkfd) {
+ server->ready = 0;
change_server_state(server, SV_ACTIVE);
- else
+ } else {
+ server->ready = 1;
change_server_state(server, SV_IDLE);
+ }
/* store old cancel key */
pktbuf_static(&tmp, server->cancel_key, 8);