From: Marko Kreen Date: Fri, 13 Nov 2009 13:55:59 +0000 (+0000) Subject: Disable maintenance during SUSPEND X-Git-Tag: pgbouncer_1_3_2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e54a38bf559819bc4367d3f7ccabc039c2c7946c;p=pgbouncer Disable maintenance during SUSPEND Otherwise some timeout may activate and close connection that is already reported to other side; --- diff --git a/src/janitor.c b/src/janitor.c index 4dd4d14..0de654e 100644 --- a/src/janitor.c +++ b/src/janitor.c @@ -503,6 +503,12 @@ static void do_full_maint(int sock, short flags, void *arg) List *item, *tmp; PgPool *pool; + /* + * Avoid doing anything that may surprise other pgbouncer. + */ + if (cf_pause_mode == P_SUSPEND) + goto skip_maint; + statlist_for_each_safe(item, &pool_list, tmp) { pool = container_of(item, PgPool, head); if (pool->db->admin) @@ -531,6 +537,7 @@ static void do_full_maint(int sock, short flags, void *arg) if (cf_auth_type >= AUTH_TRUST) loader_users_check(); +skip_maint: safe_evtimer_add(&full_maint_ev, &full_maint_period); }