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

From Alexander Kukushkin
Subject Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdownwhen pmState == PM_STARTUP
Date
Msg-id CAFh8B=k_X7z_r3d3kmeorrzcdW4f_5U_iKAtGCgih0nVLxprCA@mail.gmail.com
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
Hi,

2018-08-29 1:24 GMT+02:00 Michael Paquier <michael@paquier.xyz>:

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

Yeah, good catch, it starts checkpointer, bgwriter and in some cases
even archiver processes (when archive_mode=always) while pmState is
still equaled PM_START.
Please find attached the new version of the fix.


Regards,
--
Alexander Kukushkin

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: "Write amplification" is made worse by "getting tired" whileinserting into nbtree secondary indexes (Was: Why B-Tree suffix truncationmatters)
Next
From: Mariel Cherkassky
Date:
Subject: Re: Catalog corruption