Re: strange locks on PG 11 with Golang programs

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: strange locks on PG 11 with Golang programs
Дата
Msg-id 20200311212243.GA15977@hjp.at
обсуждение исходный текст
Ответ на Re: strange locks on PG 11 with Golang programs  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Список 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!"

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Querying an index's btree version
Следующее
От: Kevin Brannen
Дата:
Сообщение: pg_restore restores out of order