On Friday, June 17, 2016 at 5:32:25 PM UTC+3, Danilo Cicerone wrote:
>
> Hi to all,
> I'm new here and using golang too. I've read some articles and post on 
> Connection Pooling" but I'm still confused. What I'm looking for is a rule 
> of thumb that make me easy to decide when use connection pool. My scenario 
> isn't so complicated: 
>
>  - a web application that makes CRUD operations on a Postgres database.
>  - Minimun 10 clients connected up to 30.
>
> Moreover, I'm going to use pgx driver. I'd be grateful if you could help 
> me to get the difference from use or not the connection pool, which is the 
> best practice?
>
 
The documentation of the Open method in database/sql package 
(https://golang.org/pkg/database/sql/#Open) reads:

<<The returned DB is safe for concurrent use by multiple goroutines and 
maintains its own pool of idle connections. Thus, the Open function should 
be called just once. It is rarely necessary to close a DB. >>

HTH
ain

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to