From c86abb1ad43655b4952f59a12a4e76460a530c8a Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 17 Oct 2026 11:37:32 +0800 Subject: [PATCH] fix(postgres): log underlying io error on connection failure --- crates/dbx-driver-postgres/src/postgres.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/dbx-driver-postgres/src/postgres.rs b/crates/dbx-driver-postgres/src/postgres.rs index e5115e0a8a..9a6132c0d2 100644 --- a/crates/dbx-driver-postgres/src/postgres.rs +++ b/crates/dbx-driver-postgres/src/postgres.rs @@ -2997,7 +2997,9 @@ where // LISTEN/NOTIFY messages are not surfaced anywhere. Some(Ok(_)) => {} Some(Err(err)) => { - log::warn!("[postgres] connection driver error: {err}"); + // `tokio_postgres::Error`'s `Display` omits the underlying + // I/O error, which is the only clue to why the socket died. + log::warn!("[postgres] connection driver error: {}", error_with_sources_to_string(&err)); break; } None => break,