From: | amul sul <sul_amul(at)yahoo(dot)co(dot)in> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal to add connection request Wait-time in PSQL client. |
Date: | 2013-05-19 03:41:39 |
Message-ID: | 1368934899.65669.YahooMailNeo@web193502.mail.sg3.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 bounded wait 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
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2013-05-19 03:54:41 | Re: Proposal to add connection request Wait-time in PSQL client. |
Previous Message | Craig Ringer | 2013-05-19 03:12:29 | Re: Proposal to add connection request Wait-time in PSQL client. |