Re: Danger of automatic connection reset in psql - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Danger of automatic connection reset in psql
Date
Msg-id CAFj8pRCLww0dYBWDAWYnfxHcKQFZok2Di5yQO3kLskJ9t=z3Qg@mail.gmail.com
Whole thread Raw
In response to Re: Danger of automatic connection reset in psql  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: Danger of automatic connection reset in psql  (Oleksandr Shulgin <oleksandr.shulgin@zalando.de>)
List pgsql-hackers


2016-11-11 5:14 GMT+01:00 Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>:
>
> How about, instead of all this, adding an option to psql to suppress
> the automatic reconnect behavior?  When enabled, psql just exits
> instead of trying to reconnect.
>
+1. But, existing users may not notice addition of the new option and
still continue to face problem. If we add the option and make it
default not to reconnect, they will notice it and use option to get
older behaviour, but that will break applications relying on the
current behaviour. Either way, users will have at least something to
control the connection reset.

The reconnect in not interactive mode is a bad idea - and there should be disabled everywhere (it cannot to break any application - the behave of script when a server is restarted must be undefined (100% if ON_ERROR_STOP is active). In interactive mode it can be controlled by some psql session variables like AUTOCOMMIT.

Regards

Pavel
 



--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


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

pgsql-hackers by date:

Previous
From: leoaaryan
Date:
Subject: Re: Shared memory estimation for postgres
Next
From: Michael Paquier
Date:
Subject: Re: Shared memory estimation for postgres