On Sat, 25 Dec 1999, Tom Lane wrote:
> The new psql automatically tries to reconnect if the backend disconnects
> unexpectedly. This feature strikes me as ill-conceived; furthermore
> it appears to be buggy.
>
> It's ill-conceived because:
> (1) under WAL, following a backend crash the postmaster is going to be
> spending a few seconds reinitializing; an immediate reconnect attempt
> is almost guaranteed to fail.
Good point.
> (2) if I'm running an SQL script, I think it's extremely foolhardy
> to press on with executing the script as though nothing had happened.
> A backend crash is not an event to be lightly ignored.
It only does the reconnect thing if it's used interactively.
I suppose leaving psql in an unconnected state (which does exist) would be
a better solution. I'll investigate the behaviour you observed below after
I get back from my vacation.
>
> It's buggy because: it doesn't work reliably. While poking at the
> backend's problems with oversize btree index entries, I saw psql claim
> it had successfully reconnected, and then go into a catatonic state.
> It wouldn't give me a new command prompt (not even with ^C), wouldn't
> exit with ^D, and had to be killed from another shell window.
>
> This behavior doesn't seem to happen for every crash, but I'm not
> really interested in trying to debug it. I think the "feature"
> ought to be ripped out.
>
> regards, tom lane
>
> ************
>
>
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden