Skip to content

Commit 1e8fa11

Browse files
authored
Fix pgbouncerhero (#54)
1 parent d4186b7 commit 1e8fa11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/admin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ async fn show_lists(stream: &mut OwnedWriteHalf, pool: &ConnectionPool) -> Resul
6868
res.put(row_description(&columns));
6969
res.put(data_row(&vec![
7070
"databases".to_string(),
71-
pool.databases().to_string(),
71+
(pool.databases() + 1).to_string(), // see comment below
7272
]));
7373
res.put(data_row(&vec!["users".to_string(), "1".to_string()]));
7474
res.put(data_row(&vec![
7575
"pools".to_string(),
76-
pool.databases().to_string(),
77-
]));
76+
(pool.databases() + 1).to_string(), // +1 for the pgbouncer admin db pool which isn't real
77+
])); // but admin tools that work with pgbouncer want this
7878
res.put(data_row(&vec![
7979
"free_clients".to_string(),
8080
stats["cl_idle"].to_string(),

0 commit comments

Comments
 (0)