Re: [PATCH] postmaster: fix stale PM_STARTUP comment - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] postmaster: fix stale PM_STARTUP comment
Date
Msg-id aebMIJakOD_XEj69@paquier.xyz
Whole thread
In response to Re: [PATCH] postmaster: fix stale PM_STARTUP comment  (Ayush Tiwari <ayushtiwari.slg01@gmail.com>)
Responses Re: [PATCH] postmaster: fix stale PM_STARTUP comment
List pgsql-hackers
On Mon, Apr 20, 2026 at 12:11:45PM +0530, Ayush Tiwari wrote:
> Agreed, this is latent since 7ff23c6d277d (v15). I can prepare a
> back-branch versions patch for v15..master once the master patch
> shape is settled.

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.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Eliminating SPI / SQL from some RI triggers - take 3
Next
From: Henson Choi
Date:
Subject: Re: Experimenting with wider Unicode storage