Remove unnecessary dependencies to synchronous 'postgres' crate (#10938)

The synchronous 'postgres' crate is just a wrapper around the async
'tokio_postgres' crate. Some places were unnecessarily using the
re-exported NoTls and Error from the synchronous 'postgres' crate, even
though they were otherwise using the 'tokio_postgres' crate. Tidy up by
using the tokio_postgres types directly.
This commit is contained in:
Heikki Linnakangas
2025-02-24 11:40:25 +02:00
committed by GitHub
parent df264380b9
commit a6f315c9c9
9 changed files with 12 additions and 16 deletions

View File

@@ -31,7 +31,6 @@ futures.workspace = true
once_cell.workspace = true
parking_lot.workspace = true
pageserver_api.workspace = true
postgres.workspace = true
postgres-protocol.workspace = true
pprof.workspace = true
rand.workspace = true

View File

@@ -343,8 +343,11 @@ async fn recovery_stream(
cfg.replication_mode(tokio_postgres::config::ReplicationMode::Physical);
let connect_timeout = Duration::from_millis(10000);
let (client, connection) = match time::timeout(connect_timeout, cfg.connect(postgres::NoTls))
.await
let (client, connection) = match time::timeout(
connect_timeout,
cfg.connect(tokio_postgres::NoTls),
)
.await
{
Ok(client_and_conn) => client_and_conn?,
Err(_elapsed) => {