From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module |
Date: | 2020-10-05 14:34:05 |
Message-ID: | 13156732-5189-af54-3d28-e2ee2a8568e0@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 them and 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 | Content-Type | Size |
---|---|---|
make_startup_use_general_shared_latch.patch | text/plain | 5.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-10-05 14:35:22 | Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0 |
Previous Message | Bharath Rupireddy | 2020-10-05 14:29:55 | Re: Logical Replication - detail message with names of missing columns |