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

Поиск
Список
Период
Сортировка
От amul sul
Тема Re: Proposal to add connection request Wait-time in PSQL client.
Дата
Msg-id 1368934899.65669.YahooMailNeo@web193502.mail.sg3.yahoo.com
обсуждение исходный текст
Ответ на Re: Proposal to add connection request Wait-time in PSQL client.  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Proposal to add connection request Wait-time in PSQL client.
Список pgsql-hackers

> It isn't clear to me why this needs to be tackled in psql or the other
> clients.

This case only for the client PSQL, who has running transaction,yet not has been finished 
and suddenly some other backend crashed or killed, then server restarted in recovery mode.

Then this client immediately send request to connection reset, But it might fail because of server is 
not startup properly to accept connection from recovery mode.
So, idea behind this, before throwing connection fail error, client should wait keep trying for connection reset, in
boundedwait time. 

> 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.

Yes, you are correct. even in those script need to add time interval to resend  request again and again.
 Instead of this, can we add loop in Client code, so it can keep trying to connection request?
 in a way, we client terminal wont hangup by throwing  *The connection to the server was lost. Attempting reset:
Failed. !*

Regards,
Amul Sul



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Proposal to add connection request Wait-time in PSQL client.
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Proposal to add connection request Wait-time in PSQL client.