Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdownwhen pmState == PM_STARTUP - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdownwhen pmState == PM_STARTUP
Date
Msg-id 20180828232412.GN29157@paquier.xyz
Whole thread Raw
In response to Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdownwhen pmState == PM_STARTUP  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdownwhen pmState == PM_STARTUP
List pgsql-hackers
On Mon, Aug 27, 2018 at 07:34:55PM -0700, Michael Paquier wrote:
> That seems like a good catch and a correct fix to me.  The handling of
> SIGINT is inconsistent with SIGTERM in pmdie().  I would just add a
> comment to mention that at this stage only the startup process is
> running, and that it has been signaled already.  I'll commit that
> tomorrow.

I have been studying your patch, but it seems to me that this is not
complete as other processes could have been started before switching
from PM_STARTUP to PM_RECOVERY.  I am talking here about the bgwriter
and the checkpointer as well.  Shouldn't we switch pmState to
PM_WAIT_BACKENDS?  Your patch is missing that.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Why hash OIDs?
Next
From: Thomas Munro
Date:
Subject: Re: Why hash OIDs?