Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module
Date
Msg-id 13156732-5189-af54-3d28-e2ee2a8568e0@oss.nttdata.com
Whole thread Raw
In response to Use standard SIGHUP and SIGTERM handlers in autoprewarm module  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses 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  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers

On 2020/10/05 19:45, Bharath Rupireddy wrote:
> Hi,
> 
> Autoprewarm module is using it's own SIGHUP(apw_sigterm_handler, got_sigterm) and SIGTERM(apw_sighup_handler,
got_sighup)handlers which are similar to standard signal handlers(except for a difference [1]). Isn't it good to remove
themand  use standard SignalHandlerForConfigReload and SignalHandlerForShutdownRequest?
 
> 
> Attaching the patch for the above changes.
> 
> Looks like the commit[2] replaced custom handlers with standard handlers.
> 
> Thoughts?

+1

The patch looks good to me.

ISTM that we can also replace StartupProcSigHupHandler() in startup.c
with SignalHandlerForConfigReload() by making the startup process use
the general shared latch instead of its own one. POC patch attached.
Thought?

Probably we can also replace sigHupHandler() in syslogger.c with
SignalHandlerForConfigReload()? This would be separate patch, though.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Logical Replication - detail message with names of missing columns
Next
From: Heikki Linnakangas
Date:
Subject: Re: Online checksums patch - once again