Here's an updated version of this patch.
The main idea is that SendProcSignal(pid, PROCSIGNAL_XXX, procno)
becomes SendInterrupt(INTERRUPT_XXX, procno), and all the pending
interrupt global variables and pss_procsignalFlags[] go away, along
with the SIGUSR1 handler. The interrupts are compressed into a single
bitmap. See commit message for more details.
The patch is failing on Windows CI for reasons I haven't debugged yet,
but I wanted to share what I have so far. Work in progress!
Here is my attempt to survey the use of signals and write down what I
think we might do about them all so far, to give the context for this
patch:
https://wiki.postgresql.org/wiki/Signals
Comments, corrections, edits very welcome.