mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-27 02:36:29 +00:00
talk!
This commit is contained in:
@@ -47,8 +47,8 @@ impl ManageConnection for ServerPool {
|
|||||||
|
|
||||||
/// Attempts to create a new connection.
|
/// Attempts to create a new connection.
|
||||||
async fn connect(&self) -> Result<Self::Connection, Self::Error> {
|
async fn connect(&self) -> Result<Self::Connection, Self::Error> {
|
||||||
|
println!(">> Getting new connection from the pool");
|
||||||
let address = self.replica_pool.get();
|
let address = self.replica_pool.get();
|
||||||
// println!(">> Getting connetion from pool");
|
|
||||||
|
|
||||||
match Server::startup(
|
match Server::startup(
|
||||||
&address.host,
|
&address.host,
|
||||||
@@ -107,9 +107,7 @@ impl ManageConnection for ServerPool {
|
|||||||
/// many sharded primaries or replicas.
|
/// many sharded primaries or replicas.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct ReplicaPool {
|
pub struct ReplicaPool {
|
||||||
// replicas: Vec<Pool<ServerPool>>,
|
|
||||||
addresses: Vec<Address>,
|
addresses: Vec<Address>,
|
||||||
// user: User,
|
|
||||||
round_robin: Counter,
|
round_robin: Counter,
|
||||||
banlist: BanList,
|
banlist: BanList,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user