Обсуждение: [psycopg] psycopg2.pool connection recovery/healing

Поиск
Список
Период
Сортировка

[psycopg] psycopg2.pool connection recovery/healing

От
Paul Bryan
Дата:
If a connection from a connection pool goes bad (e.g. got disconnected), what's the right thing to do with it?

Re: [psycopg] psycopg2.pool connection recovery/healing

От
Daniele Varrazzo
Дата:
On Wed, Jan 4, 2017 at 11:50 PM, Paul Bryan <pbryan@salesforce.com> wrote:
> If a connection from a connection pool goes bad (e.g. got disconnected),
> what's the right thing to do with it?

If you put it back in the pool it should be detected as broken and
replaced with a fresh one.

-- Daniele


Re: [psycopg] psycopg2.pool connection recovery/healing

От
Paul Bryan
Дата:
Thanks!

On Thu, Jan 5, 2017 at 4:49 AM, Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
On Wed, Jan 4, 2017 at 11:50 PM, Paul Bryan <pbryan@salesforce.com> wrote:
> If a connection from a connection pool goes bad (e.g. got disconnected),
> what's the right thing to do with it?

If you put it back in the pool it should be detected as broken and
replaced with a fresh one.

-- Daniele