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 1wF3HJ-004hPE-1v for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Apr 2026 05:04:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wF3HH-0067JZ-2B for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Apr 2026 05:04:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wF3HH-0067JR-0p for pgsql-hackers@lists.postgresql.org; Tue, 21 Apr 2026 05:04:03 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wF3HF-000000021yd-0dj7 for pgsql-hackers@postgresql.org; Tue, 21 Apr 2026 05:04:02 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-7baee75f874so16937657b3.2 for ; Mon, 20 Apr 2026 22:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776747841; cv=none; d=google.com; s=arc-20240605; b=Aq/9ZSPRW1OGcPSNfZpebfoVv38uuS04AOYJmy3frTTf3MsAlW2FUPqvwoX9aEO7TT VANvLK7sXieNIvRSzcLmktt9AfsWZ2k1d2WlizSnc2h//t8brjeDFTDHSq2suLIhsMd2 JzxIqkj9VR+VISR0moS9AGD5FL9GJvoDc28dhEJt/4u4F8Io65dQBn3K/MfW7Ao3hCQV 1VIBCcHZW/z635xaHS2LOP7bUOg1y8FNNK9/Y7sghFfnw/Od0UQfIni8UVcgoxcfyRUI DXAEdZU6xrsK+qgoBl0bCAoNuC22ohvzPqXu3vEuBbj01Nb7eU7RIugRMqa97y2Qq1Ks 9zOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=tdaWzOoFGbeDT/dztcADbhut0UFGnFv436t17TF5E1s=; fh=9N8yOERJcga4xBe6uLj/SiZws4K/5lu7oxxddGNL134=; b=i8mUxStYyCRg4wG9g33/IKAxlWZqxpEVRW8Tql6LndIfghYnVZsg0/VKBaHfexPQKk 7mfIcNZHSE+qWyiW6QlqfGu8dLGxPvmQS7XWoS9XMJU7+MxaeEGsslE//lckAiJkCde+ E9SEpnnc7MMWLoIpUeW+QBxusUSa5HCpRz216H0F3TvEE7E+XFEnSdaIpdfx9AW/rWCO L5k3Vdtqxg4G7h9ry8YJGEmPv+Tn+iJjZK4v4FIEKI+3Sq0jXsWjLg8APA6Bq0tmdrkF sg2ehxpTipi1zseg29FWVE3va/0zGlNpep9vqWWszhbRQ8MhNEsGoVtCz2+MDAN2apoq DbbA==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776747841; x=1777352641; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tdaWzOoFGbeDT/dztcADbhut0UFGnFv436t17TF5E1s=; b=D9cmXbuqMpvQMgyrzrnqRSetaqNZBLf3oc/hsg9Be62oPnre0c7u9x6e7z6XNz0ktb fMAn9LDbuQEzH0FaaturoaNtt9DRHb8qa0a3Sm9VgBRXV/d0R6A8XZ/wQQ2AOXHE2Bzh AVK+koMFmifEDBM3euMcsiFG6kMqHRdxV9VFCNOQvvOUYcbZa2OEtI48Y/LH5ZvXp71Q neRTyO3Xk5BAL4AkG/Ib8L0JxqRi/P1Ly51JXKobMJdG74NmJqIyaqg1c1XIyqVdg2Pk HIM7rzL4rPi5ai2ylEm2JkTxwxTnq/7KpQ5231ODW6/CZsbpiM+hQvC0bgRYmCZL1HnB RBSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776747841; x=1777352641; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tdaWzOoFGbeDT/dztcADbhut0UFGnFv436t17TF5E1s=; b=DeNw9vhMgfEqLXYKerir8I2aloScWeLS0ULJMb7ied8uBpxaZPlfJOZl9v9CsZr7sO wcFF7Ce+ynqfHScD4VIZZM2NXDILarGVrRg/+QRJ56gjF5IVKyrrNk6VpwDMXCfFsQGE yLhDIOwlRBfsGsJWfu/8Raz4aXxZHkvEZpWZrA4bOF1g3iihB4+dBU55Jk60WDW8BUCU QSvsHAng4oUyyxIFOBs/G0lJ7VdYrFKqxA4Lu+F+/ztzO0ZxJPoOVYJ8sANHGaUbuV5i gOObU2iU2aUP/cy5L0+Ct++EzhMyP0GBRum5mlNfXIzKvYhq73Gop3mk7x9cDP7+5gqY LpNQ== X-Forwarded-Encrypted: i=1; AFNElJ+2UbOvUSMf+xdN1EGeozP8Rl2zZEtQCwvq5WlwJE3iA06FIyfnVzS0XNBnRHsWlMnQ7QLOBz9Lb4G+Y1kj@postgresql.org X-Gm-Message-State: AOJu0Yzsx0RWSl/coXOah5VN3rhLecNgDATPpgPntcIxe50JH+77r6oi /IBnxeEvW+ldCSYcLQw/rrrzeqo7dY1hu/WWWdcAq8WNSjhKIUOhgo7+pWnEs1RzY1DaQJ56jSm A3WPw40jboZGO06z18UGIlzvyiAlXxbN3W4MJ X-Gm-Gg: AeBDieuk4tgRHn3CwQeqCb7Fln2ixaYX4RS9qz2lnHMxh4kfF03Z3jTER49X1VLUMv9 7W4kMabQuX/KiJ5HWrbi/DJiv9H8ufQHtOG7/u6gTAY8NJuPd7DyMttBFknb7MCKsqIS7zLTKr1 MEyxsjnhbzwV5Cfop8dv4XLRu9G7PJYHks/45MRstYsoz9dSHpcJbEXf9vDfX/2/qAyJXtE+EMH 6pU6ui0dEp73j5anCjPZID12rmu4Cd+m4yqHMgvwFxS7rpZa1XsoVhPmWTHi7kLvuq9LLJBDyPC c4CWERKeEft9A1C37cOrVAS0pCsTD2q1XiGrePFVUZ5CMyI= X-Received: by 2002:a05:690c:4992:b0:7ba:ded4:df53 with SMTP id 00721157ae682-7baded4e7d4mr96435607b3.32.1776747840919; Mon, 20 Apr 2026 22:04:00 -0700 (PDT) MIME-Version: 1.0 References: <0f462532-9790-4334-b503-4ee522225820@iki.fi> In-Reply-To: From: Ayush Tiwari Date: Tue, 21 Apr 2026 10:33:48 +0530 X-Gm-Features: AQROBzAAYN95j-ZgRhLVd49PcFEqbVd5hxEsY9bGpcey6qGskwpvYFUzEy9kSuI Message-ID: Subject: Re: [PATCH] postmaster: fix stale PM_STARTUP comment To: Michael Paquier Cc: Heikki Linnakangas , pgsql-hackers@postgresql.org, "noah@leadboat.com" Content-Type: multipart/alternative; boundary="000000000000e9dcb6064ff15706" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e9dcb6064ff15706 Content-Type: text/plain; charset="UTF-8" On Tue, 21 Apr 2026 at 06:30, Michael Paquier wrote: > On Mon, Apr 20, 2026 at 12:11:45PM +0530, Ayush Tiwari wrote: > > No need to. I have poked at this problem a bit more, stracing my way > as you did, and after more testing across v15~HEAD, I have applied it. > For v15, a difference becomes necessary at HandleChildCrash(), or we > would begin to fail the shutdown sequence should the startup process > have the idea to PANIC. This maps with the changes in v18 and HEAD > where this has been replaced by a switch/case. > > Another thing that I have spent a long time looking at is > process_pm_child_exit() and the interference that this could generate > for the startup process case, but here as well I did not spot any > issue, so I think that we are in the clear. > > There was also a comment at the top of postmaster.c that incorrectly > claimed that the checkpointer and the background writer were only > started after switch to PM_RECOVERY, which was wrong. I have tweaked > that while on it. > > That was a good catch overall. > > Thanks a lot Michael for looking into it and pushing it! Regards, Ayush --000000000000e9dcb6064ff15706 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, 21 Apr = 2026 at 06:30, Michael Paquier <m= ichael@paquier.xyz> wrote:
On Mon, Apr 20, 2026 at 12:11:45PM +0530, Ayush Tiwari wr= ote:

No need to.=C2=A0 I have poked at this problem a bit more, stracing my way<= br> as you did, and after more testing across v15~HEAD, I have applied it.
For v15, a difference becomes necessary at HandleChildCrash(), or we
would begin to fail the shutdown sequence should the startup process
have the idea to PANIC.=C2=A0 This maps with the changes in v18 and HEAD where this has been replaced by a switch/case.

Another thing that I have spent a long time looking at is
process_pm_child_exit() and the interference that this could generate
for the startup process case, but here as well I did not spot any
issue, so I think that we are in the clear.

There was also a comment at the top of postmaster.c that incorrectly
claimed that the checkpointer and the background writer were only
started after switch to PM_RECOVERY, which was wrong.=C2=A0 I have tweaked<= br> that while on it.

That was a good catch overall.


Than= ks a lot Michael for looking into it and pushing it!

Regards,
Ayu= sh=C2=A0
--000000000000e9dcb6064ff15706--