Re: strange locks on PG 11 with Golang programs - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: strange locks on PG 11 with Golang programs
Date
Msg-id 20200311212243.GA15977@hjp.at
Whole thread Raw
In response to Re: strange locks on PG 11 with Golang programs  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-general
On 2020-03-09 11:02:37 +0200, Achilleas Mantzios wrote:
> Fully review your programs for connection / xaction leaks. Do you use a
> connection pool?

Go's sql package encourages the use of connection pools (type DB) over
single connections (type Conn):

| Prefer running queries from DB unless there is a specific need for a
| continuous single database connection.

All tutorials I've seen follow this recommendation, so a Go programmer
might not even be aware that connections exist.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Querying an index's btree version
Next
From: Kevin Brannen
Date:
Subject: pg_restore restores out of order