mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-25 10:06:28 +00:00
add default server role; bug fix
This commit is contained in:
@@ -124,10 +124,7 @@ impl ConnectionPool {
|
||||
// Make sure if a specific role is requested, it's available in the pool.
|
||||
match role {
|
||||
Some(role) => {
|
||||
let role_count = addresses
|
||||
.iter()
|
||||
.filter(|&db| db.role == Role::Primary)
|
||||
.count();
|
||||
let role_count = addresses.iter().filter(|&db| db.role == role).count();
|
||||
|
||||
if role_count == 0 {
|
||||
println!(
|
||||
|
||||
Reference in New Issue
Block a user