Re: Proposal to add connection request Wait-time in PSQL client.

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Proposal to add connection request Wait-time in PSQL client.
Дата
Msg-id 5198431D.1090002@2ndquadrant.com
обсуждение исходный текст
Ответ на Proposal to add connection request Wait-time in PSQL client.  (amul sul <sul_amul@yahoo.co.in>)
Ответы Re: Proposal to add connection request Wait-time in PSQL client.
Список pgsql-hackers
On 05/17/2013 08:22 AM, amul sul wrote:
> Hello,
>
> I have observed the following same situation in PG 9.3beta1
> Multiple PSQL clients are connected to server, some of them running  transaction and some of them are idle state.
>
>  
> When one of the backend is killed or crashed (using kill -9 <backend-pid>).
> The connection reset attempt from the active clients( that is, which were running a  transaction and crashed in
between)fails, since they immediately make the attempt while the server is in startup phase.
 
It isn't clear to me why this needs to be tackled in psql or the other
clients.

Usually one has retry and back-off code in whatever's using the client -
shell script using psql, Python program with psycopg2, Java program with
PgJDBC, etc - that manages reconnection and retries.

If server restarts were routine it might more sense to teach the client
code about this - but they should not be. Your first problem is "killed
using kill -9". You should not need to do that, nor should you be
experiencing backed crashes. If you are, investigate the underlying
cause and fix that.

I'm not a big fan of the idea of psql having its own internal retry loop.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services




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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: request a new feature in fuzzystrmatch
Следующее
От: amul sul
Дата:
Сообщение: Re: Proposal to add connection request Wait-time in PSQL client.