Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module
| От | Fujii Masao |
|---|---|
| Тема | Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module |
| Дата | |
| Msg-id | 9e3f88cd-0cc4-ac9e-4102-505ac8213fc9@oss.nttdata.com обсуждение исходный текст |
| Ответ на | Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
| Ответы |
Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module
|
| Список | pgsql-hackers |
On 2020/11/27 12:13, Bharath Rupireddy wrote: > On Wed, Nov 25, 2020 at 8:08 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com <mailto:bharath.rupireddyforpostgres@gmail.com>>wrote: > > > > > When I read the patch again, I found that, with the patch, the shutdown > > > of worker_spi causes to report the following FATAL message. > > > > > > FATAL: terminating connection due to administrator command > > > > > > Isn't this message confusing because it's not a connection? If so, > > > we need to update ProcessInterrupts() so that the proper message is > > > reported like other bgworkers do. > > > > > > > This is also true for all the bgworker that use the die() handler. How about doing it the way bgworker_die() does inProcessInterrupts()? This would give meaningful information. Thoughts? If okay, I can make a separate patch. > > > > Attaching the patch that improved the message for bg workers in ProcessInterrupts(). For instance, now it looks like *FATAL: terminating background worker "worker_spi" due to administrator command* or *FATAL: terminating background worker"parallel worker" due to administrator command *and so on for other bg workers.* > * > > Please review the patch. Thanks for the patch! It looks good to me. > > I'm also mentioning the 2 previous patches posted in [1]. One of the patch is for using die() instead of handle_sigterm()in test_shm_mq/worker.c and another is for replacing custom SIGTERM handler worker_spi_sigterm() with die()and custom SIGHUP handler worker_spi_sighup() with standard SignalHandlerForConfigReload() Yeah, I pushed them. Thanks! Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: