Skip to content

Commit 294af9d

Browse files
committed
typo postgresql: better logs
better logs when fail to connect 59a267cfeab173c76fe7a8526d511094253973f8
1 parent 97bb610 commit 294af9d

File tree

1 file changed

+6
-3
lines changed
  • postgresql/src/storages/postgres/detail

1 file changed

+6
-3
lines changed

postgresql/src/storages/postgres/detail/pool.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,12 @@ Connection* ConnectionPool::Pop(engine::Deadline deadline) {
558558

559559
++stats_.pool_exhaust_errors;
560560
throw PoolError(
561-
fmt::format("No available connections found. Active {}. Open {}. Max {}",
562-
stats_.connection.active, stats_.connection.open_total,
563-
stats_.connection.maximum),
561+
fmt::format(
562+
"No available connections found. Connecting: {}. Max concurrent "
563+
"connecting: {}. Active: {}. Max active {}",
564+
connecting_semaphore_.UsedApprox(),
565+
connecting_semaphore_.GetCapacity(), size_semaphore_.UsedApprox(),
566+
size_semaphore_.GetCapacity()),
564567
db_name_);
565568
}
566569

0 commit comments

Comments
 (0)