Re: Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-09-19T11:48:42Z
Lists: pgsql-hackers
On Mon, Sep 18, 2017 at 2:04 PM, Andres Freund <andres@anarazel.de> wrote:
> On 2017-09-18 12:16:42 -0400, Robert Haas wrote:
>> On Mon, Sep 18, 2017 at 6:32 AM, Andres Freund <andres@anarazel.de> wrote:
>> > One thing that I've noticed for a while, but that I was reminded of
>> > again here. We very frequently allow psql to reconnect in case of crash,
>> > just for postmaster to notice a child has gone and kill that session. I
>> > don't recall that frequently happening, but these days it happens nearly
>> > every time.
>>
>> I don't understand what you're talking about here.
>
> I often see a backend crash, psql reacting to that crash by
> reconnecting, successfully establish a new connection, just to be kicked
> off by postmaster that does the crash restart cycle. I've not yet
> figured out when exactly this happens and when not.
Oh, I've not seen that. Mostly, what I think we should fix is the
fact that the libpq messages tend to report that the server crashed
even if it was an orderly shutdown.
[rhaas ~]$ psql
psql (11devel)
Type "help" for help.
rhaas=# select 1;
FATAL: terminating connection due to administrator command
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
It's sort of funny (but also sort of sad) that we've got libpq talking
down the server's reliability (and even in the face of evidence which
manifestly contradicts it).
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Commits
-
Add test for postmaster crash restarts.
- a1924a4ea293 11.0 landed
-
Fix crash restart bug introduced in 8356753c212.
- ec9e05b3c392 11.0 landed
-
Perform only one ReadControlFile() during startup.
- 8356753c212a 11.0 cited