Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdown when pmState == PM_STARTUP

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexander Kukushkin <cyberdemn(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdown when pmState == PM_STARTUP
Date: 2018-08-28 23:24:12
Message-ID: 20180828232412.GN29157@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-08-28 23:45:32 Re: Why hash OIDs?
Previous Message Thomas Munro 2018-08-28 23:05:38 Re: Why hash OIDs?