pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.
Date: Mon, 18 Sep 2017 03:32:13 -0700
Message-ID: <20170918103213.nhlmfh5v3qrgoskg@alap3.anarazel.de> (raw)
In-Reply-To: <20170917080752.rcmihzfmgbeuqjk2@alap3.anarazel.de>
References: <E1dsbXB-0006pK-EE@gemulon.postgresql.org>
	<14134.1505572349@sss.pgh.pa.us>
	<20170916182634.blb7upixw7hosdhu@alap3.anarazel.de>
	<23456.1505586621@sss.pgh.pa.us>
	<20170916183849.kgqlyi3q2oy4qjkx@alap3.anarazel.de>
	<27204.1505591941@sss.pgh.pa.us>
	<20170916202705.lhszupzi3s4iaxy6@alap3.anarazel.de>
	<20170917080752.rcmihzfmgbeuqjk2@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2017-09-17 01:07:52 -0700, Andres Freund wrote:
> On 2017-09-16 13:27:05 -0700, Andres Freund wrote:
> > > This does not seem like a problem that justifies a system-wide change
> > > that's much more delicate than you thought.
> > 
> > We need one more initialization call during crash-restart - that doesn't
> > seem particularly hard a fix.
> 
> FWIW, attached is that simple fix. Not quite ready for commit - needs
> more comments, thoughts and a glass of wine less to commit.
> 
> I'll try to come up with a tap test that tests crash restarts tomorrow -
> not sure if there's a decent way to trigger one on windows without
> writing a C function. Will play around with that tomorrow.

This took a bit longer than I anticipated. Attached.  There's
surprisingly many issues with timing that make this not as easy as I
hoped.  I think in later commits we should extend this to cover things
like the autovacuum / stats process / ... being killed - but that seems
like material for a separate commit.

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.

Regards,

Andres

Attachments:

  0001-Add-tests-for-postmaster-crash-restarts.patch (text/x-diff, 0B) download

view thread (21+ messages)  latest in thread

Message-ID: <20170918103213.nhlmfh5v3qrgoskg@alap3.anarazel.de>
Permalink:  ../20170918103213.nhlmfh5v3qrgoskg@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20170918103213.nhlmfh5v3qrgoskg@alap3.anarazel.de

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.
  In-Reply-To: <20170918103213.nhlmfh5v3qrgoskg@alap3.anarazel.de>
  References: <E1dsbXB-0006pK-EE@gemulon.postgresql.org> <14134.1505572349@sss.pgh.pa.us> <20170916182634.blb7upixw7hosdhu@alap3.anarazel.de> <23456.1505586621@sss.pgh.pa.us> <20170916183849.kgqlyi3q2oy4qjkx@alap3.anarazel.de> <27204.1505591941@sss.pgh.pa.us> <20170916202705.lhszupzi3s4iaxy6@alap3.anarazel.de> <20170917080752.rcmihzfmgbeuqjk2@alap3.anarazel.de> <20170918103213.nhlmfh5v3qrgoskg@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox