From 1e8fa110ae44746e53766db5c14d18574fd40d84 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Wed, 2 Mar 2022 14:46:31 -0800 Subject: [PATCH] Fix pgbouncerhero (#54) --- src/admin.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/admin.rs b/src/admin.rs index 3301c64..39fb3be 100644 --- a/src/admin.rs +++ b/src/admin.rs @@ -68,13 +68,13 @@ async fn show_lists(stream: &mut OwnedWriteHalf, pool: &ConnectionPool) -> Resul res.put(row_description(&columns)); res.put(data_row(&vec![ "databases".to_string(), - pool.databases().to_string(), + (pool.databases() + 1).to_string(), // see comment below ])); res.put(data_row(&vec!["users".to_string(), "1".to_string()])); res.put(data_row(&vec![ "pools".to_string(), - pool.databases().to_string(), - ])); + (pool.databases() + 1).to_string(), // +1 for the pgbouncer admin db pool which isn't real + ])); // but admin tools that work with pgbouncer want this res.put(data_row(&vec![ "free_clients".to_string(), stats["cl_idle"].to_string(),