> 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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to