Re: Use SIGQUIT instead of SIGUSR1? - Mailing list pgsql-hackers

From ncm@zembu.com (Nathan Myers)
Subject Re: Use SIGQUIT instead of SIGUSR1?
Date
Msg-id 20010308133350.X624@store.zembu.com
Whole thread Raw
In response to Use SIGQUIT instead of SIGUSR1?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Use SIGQUIT instead of SIGUSR1?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Mar 08, 2001 at 04:06:16PM -0500, Tom Lane wrote:
> To implement the idea of performing a checkpoint after every so many
> XLOG megabytes (as well as after every so many seconds), I need to pick
> an additional signal number for the postmaster to accept.  Seems like
> the most appropriate choice for this is SIGUSR1, which isn't currently
> being used at the postmaster level.
> 
> However, if I just do that, then SIGUSR1 and SIGQUIT will have
> completely different meanings for the postmaster and for the backends,
> in fact SIGQUIT to the postmaster means send SIGUSR1 to the backends.
> This seems hopelessly confusing.
> 
> I think it'd be a good idea to change the code so that SIGQUIT is the
> per-backend quickdie() signal, not SIGUSR1, to bring the postmaster and
> backend signals back into some semblance of agreement.
> 
> For the moment we could leave the backends also accepting SIGUSR1 as
> quickdie, just in case someone out there is in the habit of sending
> that signal manually to individual backends.  Eventually backend SIGUSR1
> might be reassigned to mean something else.  (I suspect Bruce is
> coveting it already ;-).)

The number and variety of signals used in PG is already terrifying.

Attaching a specific meaning to SIGQUIT may be dangerous if the OS and 
its daemons also send SIGQUIT to mean something subtly different.  I'd 
rather see a reduction in the use of signals, and a movement toward more 
modern, better behaved interprocess communication mechanisms.  Still, 
"if it were done when 'tis done, then 'twere well It were done" cleanly.

--
Nathan Myers
ncm@zembu.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Use SIGQUIT instead of SIGUSR1?
Next
From: Peter Eisentraut
Date:
Subject: Re: Performance monitor