mirror of
https://github.com/jackc/pgx.git
synced 2025-07-07 19:19:37 +00:00
Merge pull request #153 from achiku/fix-stdlib-error-message
Fix error message in stdlib
This commit is contained in:
commit
9d284da48e
@ -132,7 +132,7 @@ func OpenFromConnPool(pool *pgx.ConnPool) (*sql.DB, error) {
|
|||||||
stat := pool.Stat()
|
stat := pool.Stat()
|
||||||
|
|
||||||
if stat.MaxConnections <= 2 {
|
if stat.MaxConnections <= 2 {
|
||||||
return nil, errors.New("pool connection size must be at least 2")
|
return nil, errors.New("pool connection size must be at least 3")
|
||||||
}
|
}
|
||||||
db.SetMaxIdleConns(stat.MaxConnections - 2)
|
db.SetMaxIdleConns(stat.MaxConnections - 2)
|
||||||
db.SetMaxOpenConns(stat.MaxConnections)
|
db.SetMaxOpenConns(stat.MaxConnections)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user