sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

Multiple Hosts, Failover

Open dayvejones opened this issue 1 year ago • 1 comments

Hello! It would be great to have a feature like this:

let hosts = vec!["postgres://postgres:password@server1/test".to_string(), "postgres://postgres:password@server2/test".to_string()];

let pool = PgPoolOptions::new() .max_connections(50) .load_balance_hosts(true) .connect(hosts).await?;

Good example: https://www.npgsql.org/doc/failover-and-load-balancing.html?tabs=7

Sorry, if this already exists.. Thanks!

dayvejones avatar Jul 05 '24 18:07 dayvejones

Seems like a duplicate of https://github.com/launchbadge/sqlx/issues/2290 That Issue also has more context what "failover" means for the specific databases

CommanderStorm avatar Jul 07 '24 17:07 CommanderStorm