Re: Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-09-18T18:04:39Z
Lists: pgsql-hackers
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.

- Andres


Commits

  1. Add test for postmaster crash restarts.

  2. Fix crash restart bug introduced in 8356753c212.

  3. Perform only one ReadControlFile() during startup.