Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wu76E-000TSY-2q for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Aug 2026 11:26:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wu76C-007BNG-2P for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Aug 2026 11:26:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wu76C-007BN8-1Z for pgsql-bugs@lists.postgresql.org; Wed, 12 Aug 2026 11:26:21 +0000 Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wu769-00000000LSr-3vuY for pgsql-bugs@lists.postgresql.org; Wed, 12 Aug 2026 11:26:21 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 38F117A0182; Wed, 12 Aug 2026 07:26:16 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 12 Aug 2026 07:26:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1786533976; x= 1786620376; bh=LlmtLgBASv+EZqHPDlZUFO1eUHDo7SwGO2BK20+sKD4=; b=b atfgvtBsWOr75eNSr61pR/H28GBErYF/mODzej3y2bFIRio3390gciSgqAoyjPDa PJImCjM/MHPZy8+0TOdJWKg6VSBar05d88GhoyVloXCHxNUV6aTMHHmLsroaiCQz ggGoUJWlN54sa54b9e0B59slw2ZKjOuIyiGHLo4oNFwGmAAG5ybzLpUAx/6lzDGD DlJsYsIKR2JUpKNj2vGlddrqyiEFKH5NeXSZL20aZ0iCvwaK8x/1IDFbXgarKQ6g AHGIFKsfgDsKQJ7B2R9JVRU2IZCP+vSHYZX7KPDplenZ/mCgAZJTjThFPFHhT/j1 HdeJFgNhRcp/9YRfYh5FQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1786533976; x=1786620376; bh=L lmtLgBASv+EZqHPDlZUFO1eUHDo7SwGO2BK20+sKD4=; b=Sv4QjjNFVVhg2MkHa E7ypNLoZ4LfnqXcIQMd9u+nSa8WaTORWhlDRiYEb0ING9kudftDyAK+k34Z/KLRr 3vA1WInq53laCTG9bLILN4QEPoUuWbTR4E/6zbe9HPdNrg7JDrkk/1rzHrb32K2u 9wP2jlkUcboezO5EqIOjpJdADShsthoGgu1uvBqGXGeouBnVgElcSDhHoO60r3Y3 QS/6rzWC/Zq1cqMHLv+8m4Ny9b0h9+RO6YU8Fcs/xB4rDlJCkGA7p7b5AAurIlEL EA3hzcbaV1ZPcUliw0huoplIB9qB/irq583J+KUUqDPzRKoOGEQQ+HJnL6GdA5aI K3GZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFqNdcMEls+x7vKH0LUDSpXKx62b9T6hYHFpIb8Xdf/wLoN5aB1u7+z9n3uEp65/l myRbMDN67+PIPgl+ELl+l9dMEx5ILPutB6vRL9fGh43yHetgqBPiiCMdtQHMWKum4chv6f yRcgVv43QmKMUXCGSqvoyWs+6swArluFHiYXIeFn4Uu99cNhWHZCNt92fD3IlDEsaxXkds kIua7R5XbdKHslsuDIyEJ0qpSKRnuZp9JB6m4UZpqaAYtgfcWAkO2ZRrxfsGSUyYHNkHWx XgZj9axzXdgUNF8hr20PCLaF2X4EkwyPEw0FlbyengLZfhvObU3RpI6mu5AXjC6Xz07HMd BXEgr2+O1wRIpQ2V20NmfxgH857liuO9F6/nMtA5xFgC/726i3Dx8XFVu9GlkwWGdloIuf i1mG5Ss+wNtrdys1/PmeMNxb2IaYbNDDsjjqNv+30onbP/8ROrpOvYJMn3Ktsymchgp0Cu VXnPbaEj3nHXpLu5fdCFFQFRu68BQcNIAIjnV6TA7Zec5S58r6XHaGZiJ1N8tuQmn+KnBQ W8s7FTKSozSKcqVsq0ZP1Qh4s3emqzT08lrWHziLCxoRSOknvytAgOnNIe5Tis423RseA/ dP9ftCNUeSaqXYTp+j/KPM5+0QkDN6dunldeaQb5AaeQDjzql0lewrtVa3Gg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Aug 2026 07:26:15 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1786533974; bh=x6AeQd1mZanffXIg/KLer5NYJvaspVzD45+HjUwW7q4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=gqdEWK0NQNgFvQaS+phBGVfz53Ev/CjaalZ7EQdF4GKx9GG866RG1cmDz2EAz0z74 yqULAt0BEDWgIDbFMmBvidP4N1/LYCQLNQBSt9oXtWTO0M6U8w6gGGQcl1mPPMCNf8 SS62GG2TTq3p4GnZ2JJjv3cq6mHvSr+i1lMHf1T1pLVGVIKZpG4j4sjINJiBMHAInU nsV0HETvjdTIHf9dJG2U4j9AKVacfqy0MTEf0O2mgHKQtbxM9lFMHdYzf3VklY3COu qSsbgwbm9TDArt4WvDixXGzCK1YCJhOAPp5jCR6hfFLDLu7gMiHp4+XIUalxS8y1LD /sGpM4gN0YBeg== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 60558B001DA; Wed, 12 Aug 2026 13:26:14 +0200 (CEST) Date: Wed, 12 Aug 2026 13:26:14 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Daniel Gustafsson Cc: scherbakov_lo_radarmms@mail.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19610: Database won't start if an unrelated process is exist Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Aug-07, Daniel Gustafsson wrote: > > Steps: > > 1. start Postgress database > > 2. hard reboot system by > > sudo sh -c "echo b > /proc/sysrq-trigger" > > 3. wait for system boot up. > > 4. get a PID-number from the the first line of postmaster.pid > > 5. create ANY process that have PID that same as PID-number > > 6. start Postgress database > > 7. The database will not start > > > > If skip step 5 then database starts successfully. > > This is not a bug, it is the intended behaviour, a process with the PID from > the .pid file which is owned by the same userid is reported this way. Well, I'm not sure this is really intended. I'd say it's rather emergent behavior from what we can do, which is to inquiry whether a process with that PID exist or not; and if it does, we assume it's the postmaster and give up. But maybe there are ways to verify whether it's really a postmaster that indeed corresponds to that .pid file; so that if we can determine it's not, then the .pid file is stale and we can remove it and move on. I guess the problem is figuring out what sort of (extremely reliable) test we can make to verify whether a process is a postmaster or not. If we get it wrong, the user ends up with corrupt data which definitely is not nice. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/