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: Noah Misch <noah@leadboat.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: TAP tests: check for postmaster.pid anyway when "pg_ctl start" f
Date: Thu, 10 Feb 2022 14:52:54 -0800
Message-ID: <20220210225254.pds2dowte5yophmr@alap3.anarazel.de> (raw)
In-Reply-To: <20220210223806.ikpf57pz2ilamqam@alap3.anarazel.de>
References: <E1nAIWI-0006et-HW@gemulon.postgresql.org>
	<CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com>
	<855583.1642687119@sss.pgh.pa.us>
	<867290.1642689136@sss.pgh.pa.us>
	<20220120192736.msyesvdlljn6tptw@alap3.anarazel.de>
	<926839.1642708567@sss.pgh.pa.us>
	<1075553.1642717844@sss.pgh.pa.us>
	<20220210023537.GA3222837@rfd.leadboat.com>
	<1709793.1644523137@sss.pgh.pa.us>
	<20220210223806.ikpf57pz2ilamqam@alap3.anarazel.de>

Hi,

On 2022-02-10 14:38:06 -0800, Andres Freund wrote:
> On 2022-02-10 14:58:57 -0500, Tom Lane wrote:
> > So it looks to me like the core problem is that pg_ctl's do_stop()
> > is too trusting: if it once sees the postmaster PID as alive, it
> > figures that's the end of the story.
> 
> Agreed, that's a problem. Even if it wasn't the cause of slot tests on AIX.

Should we take the danger of postmaster dying without cleaning up the pid file
and then another process reusing that pid serious? That obviously could make
pg_ctl wait until timeout.

Postmaster always opening a named pipe or unix socket in the data directory
would allow to detect that, I guess. Or checking the shared memory segment for
attached processes, but that seems like a mess to do in pg_ctl.

Greetings,

Andres Freund





view thread (20+ messages)  latest in thread

Message-ID: <20220210225254.pds2dowte5yophmr@alap3.anarazel.de>
Permalink:  ../20220210225254.pds2dowte5yophmr@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20220210225254.pds2dowte5yophmr@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, noah@leadboat.com, thomas.munro@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: TAP tests: check for postmaster.pid anyway when "pg_ctl start" f
  In-Reply-To: <20220210225254.pds2dowte5yophmr@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