-
When using
it's not immediately clear to me how the underlying db connection needs to be configured. At the moment, we do this:
I'm not sure if the calls to Thank you very much for any answer and this amazing project! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When using Also you can omit |
Beta Was this translation helpful? Give feedback.
When using
stdlib.OpenDBFromPool
, the*sql.DB
only works as an adapter forpgxpool.Pool
. So you should configure all parameters forpgxpool.Pool
via pgxpool.Config. The same for the stats - connections live only inpgxpool.Pool
, so you have to use it’s stats.Also you can omit
db.SetMaxOpenConns(0)
, cause it automatically configured onstdlib.OpenDBFromPool
.