Re: [HACKERS] psql casts aspersions on server reliability

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] psql casts aspersions on server reliability
Date: 2023-11-23 00:38:52
Message-ID: 2543635.1700699932@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Wed, Sep 28, 2016 at 09:14:41AM -0400, Tom Lane wrote:
>> I could go along with just dropping the last sentence ("This probably...")
>> if the last error we got was FATAL level. I don't find "unexpectedly"
>> to be problematic here: from the point of view of psql, and probably
>> of its user, the shutdown *was* unexpected.

> I looked at this thread from 2016 and I think the problem is the
> "abnormally" word, since if the server was shutdown by the administrator
> (most likely), it isn't abnormal. Here is a patch to remove
> "abnormally".

I do not think this is an improvement. The places you are changing
are reacting to a connection closure. *If* we had previously gotten a
"FATAL: terminating connection due to administrator command" message,
then yeah the connection closure is expected; but if not, it isn't.
Your patch adds no check for that. (As I remarked in 2016, we could
probably condition this on the elevel being FATAL, rather than
checking for specific error messages.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-11-23 01:23:42 Re: [HACKERS] Changing references of password encryption to hashing
Previous Message Peter Smith 2023-11-23 00:25:44 Re: pg_upgrade and logical replication