Re: make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested.
От | Fujii Masao |
---|---|
Тема | Re: make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested. |
Дата | |
Msg-id | e5a982a5-8bb4-5a10-cf9a-40dd1921bdb5@oss.nttdata.com обсуждение исходный текст |
Ответ на | Re: make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested. (Masahiro Ikeda <ikedamsh@oss.nttdata.com>) |
Ответы |
Re: make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested.
Re: make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested. |
Список | pgsql-hackers |
On 2021/03/23 14:54, Masahiro Ikeda wrote: > Thanks for your comments. I agreed your concern and suggestion. > Additionally, we need to consider system shutdown cycle too as > CheckpointerMain()'s comment said. > > ``` > * Note: we deliberately ignore SIGTERM, because during a standard Unix > * system shutdown cycle, init will SIGTERM all processes at once. We > * want to wait for the backends to exit, whereupon the postmaster will > * tell us it's okay to shut down (via SIGUSR2) > ``` Good catch! > I changed the signal from SIGTERM to SIGUSR2 and add the comments why SIGUSR2 > is used. > (v6-0001-pgstat_avoid_writing_on_sigquit.patch) Thanks for updating the patch! + * The statistics collector is started by the postmaster as soon as the + * startup subprocess finishes. This comment needs to be updated? Because the stats collector can be invoked when the startup process sends PMSIGNAL_BEGIN_HOT_STANDBY signal. This fact makes me wonder that if we collect the statistics about WAL writing from walreceiver as we discussed in other thread, the stats collector should be invoked at more earlier stage. IIUC walreceiver can be invoked before PMSIGNAL_BEGIN_HOT_STANDBY is sent. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: