launch_ticker(db);
}
-static void drop_db(struct PgDatabase *db)
+static void drop_db(struct PgDatabase *db, bool log)
{
+ if (log)
+ log_info("Unregister database: %s", db->name);
statlist_remove(&database_list, &db->head);
pgs_free(db->c_ticker);
pgs_free(db->c_maint);
statlist_for_each_safe(el, &database_list, tmp) {
db = container_of(el, struct PgDatabase, head);
if (db->dropped)
- drop_db(db);
+ drop_db(db, true);
}
pgs_disconnect(sk);
pgs_sleep(sk, cf.check_period);
statlist_for_each_safe(el, &database_list, tmp) {
db = container_of(el, struct PgDatabase, head);
if (db->dropped)
- drop_db(db);
+ drop_db(db, true);
}
/* done with template for the moment */
statlist_for_each_safe(elem, &database_list, tmp) {
db = container_of(elem, struct PgDatabase, head);
- drop_db(db);
+ drop_db(db, false);
}
pgs_free(db_template);