Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIIJB-0001AT-9Q for pgsql-committers@arkaria.postgresql.org; Thu, 10 Feb 2022 22:53:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nIIJA-0006q0-6e for pgsql-committers@arkaria.postgresql.org; Thu, 10 Feb 2022 22:53:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIIJ9-0006pr-Vr for pgsql-committers@lists.postgresql.org; Thu, 10 Feb 2022 22:52:59 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIIJ7-0008Jd-PZ for pgsql-committers@lists.postgresql.org; Thu, 10 Feb 2022 22:52:59 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DA1A55C010D; Thu, 10 Feb 2022 17:52:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 10 Feb 2022 17:52:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=sHYeR1RQncvnjsqcR2GpZ3asjGIveepteYVGbe /qkHM=; b=j6SYg5OqwcAjz33MngQ8C2P/yBgKUSwjGyeqWoQ33cmUcWqIbJvHly V3iLArOIntDcVeiGxJ9P5X1E/j1uYNbrnHVpx57GIeTPBMxXFCPGGGHzdSFOPz28 +TpUz0jmnNb2APyE+HPBEu65Yfcr+5pdHCME8+DxmYd39QagKXLIbVhDdbLnX+Ov UcjmcjHfuPo6HllokYZjd+Yj6ka6UCH0JidbgkgD1XkI/HtXa1RXU7ftCidur++K 9NDmWDaxRAv/2UBGKt1OeqlHqHpj+F/K/D7TpVbNVNQQt0Q0+b6Q0TUH5oq/gbhI BSTXdJnOYUlzguTCLCBvuunLnemEqI6A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=sHYeR1RQncvnjsqcR 2GpZ3asjGIveepteYVGbe/qkHM=; b=IhsxgbCYP7qwfrXPfbSfDjUXxn8haOLoO eKhrZ21BQkjpuXjhrViOttbuaLG3uwtj3C1JgpFk+/ukk/Ed8TespBJHsDmQiYvB /4uDFtyIwwYIVAJ7Bw84cuoPTNNqt2QrpBAeXet54GWZk8xV3ISmyVSG02Rya96D rAD/gxqxPHSAJPpkYoZF50c23edCbB57hEByV9nHpftJFZBjqVC+Sjf0aJct72BP L1Re7LpFMQyXwVrfOwn462GIO/jJGteUGoXrauZN/YmuCsOFg6TUhoyPk1o9fDCR hcw3HKey8IR/VV/t4/jn4ZhJupf7jp5Mzf+tMIWZeDwptZxYeeC9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddriedugdduieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Feb 2022 17:52:55 -0500 (EST) Date: Thu, 10 Feb 2022 14:52:54 -0800 From: Andres Freund To: Tom Lane Cc: Noah Misch , Thomas Munro , pgsql-committers Subject: Re: pgsql: TAP tests: check for postmaster.pid anyway when "pg_ctl start" f Message-ID: <20220210225254.pds2dowte5yophmr@alap3.anarazel.de> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220210223806.ikpf57pz2ilamqam@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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