You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thanks for the great lib!
We are having some trouble on windows when there is no ssl enabled on postgresql..
If I add the ?sslmode=disable the library works ok,
If I left the lib returning the error message, pq: SSL is not enabled on the server, db.Closes does not work and the connections keep rising. Take a look....
db.SetMaxOpenConns(10) //DOES NOT WORK
db.SetMaxIdleConns(5) //DOES NOT WORK
db, err := sql.Open("postgres", m.HostData().URI)
if err != nil {
logger.Error(err)
reporter.Error(err)
return
}
// Set the maximum number of concurrently open connections to 5. Setting this
// to less than or equal to 0 will mean there is no maximum limit (which
// is also the default setting).
db.SetMaxOpenConns(10) //DOES NOT WORK
db.SetMaxIdleConns(5) //DOES NOT WORK
defer db.Close()
results, err := postgresql.QueryStats(db, "SELECT * FROM pg_stat_bgwriter") //DO A DB.QUERY
if err != nil {
err = errors.Wrap(err, "QueryStats")
logger.Error(err)
reporter.Error(err)
return //WILL EXIT HERE AND CALL db.Close()
}
The text was updated successfully, but these errors were encountered:
Hello, thanks for the great lib!
We are having some trouble on windows when there is no ssl enabled on postgresql..
If I add the ?sslmode=disable the library works ok,
If I left the lib returning the error message, pq: SSL is not enabled on the server, db.Closes does not work and the connections keep rising. Take a look....
db.SetMaxOpenConns(10) //DOES NOT WORK
db.SetMaxIdleConns(5) //DOES NOT WORK
The text was updated successfully, but these errors were encountered: