From: Marc Cousin Date: Tue, 24 Jan 2017 15:25:54 +0000 (+0100) Subject: Add paused and disabled field on the show databases command X-Git-Tag: pgbouncer_1_8~31^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74aea61c413aaace4cfe1e3b89f13bd84693cf84;p=pgbouncer Add paused and disabled field on the show databases command --- diff --git a/src/admin.c b/src/admin.c index 2db6d37..cdbbaab 100644 --- a/src/admin.c +++ b/src/admin.c @@ -477,10 +477,10 @@ static bool admin_show_databases(PgSocket *admin, const char *arg) return true; } - pktbuf_write_RowDescription(buf, "ssissiisii", + pktbuf_write_RowDescription(buf, "ssissiisiiii", "name", "host", "port", "database", "force_user", "pool_size", "reserve_pool", - "pool_mode", "max_connections", "current_connections"); + "pool_mode", "max_connections", "current_connections", "paused", "disabled"); statlist_for_each(item, &database_list) { db = container_of(item, PgDatabase, head); @@ -489,14 +489,16 @@ static bool admin_show_databases(PgSocket *admin, const char *arg) cv.value_p = &db->pool_mode; if (db->pool_mode != POOL_INHERIT) pool_mode_str = cf_get_lookup(&cv); - pktbuf_write_DataRow(buf, "ssissiisii", + pktbuf_write_DataRow(buf, "ssissiisiiii", db->name, db->host, db->port, db->dbname, f_user, db->pool_size, db->res_pool_size, pool_mode_str, database_max_connections(db), - db->connection_count); + db->connection_count, + db->db_paused, + db->db_disabled); } admin_flush(admin, buf, "SHOW"); return true;