Re: Interrupts vs signals

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>
Date: 2024-11-15T14:24:37Z
Lists: pgsql-hackers

Attachments

Here is also a version of Thomas's "Use Latch for bgworker state change 
notification patch", rebased over the "Replace latches with Interrupts" 
patch.

I used INTERRUPT_GENERAL_WAKEUP for the notification, as a 
straightforward replacement of setting the latch, but I wonder if we 
should have a dedicated interrupt flag for this instead.

-- 
Heikki Linnakangas
Neon (https://neon.tech)

Commits

  1. Ignore SIGINT in walwriter and walsummarizer

  2. Split WaitEventSet functions to separate source file

  3. Use ModifyWaitEvent to update exit_on_postmaster_death

  4. Remove unused ShutdownLatchSupport() function

  5. Rename two functions that wake up other processes

  6. Use ProcNumbers instead of direct Latch pointers to address other procs

  7. Clean up WaitLatch calls that passed latch without WL_LATCH_SET

  8. Remove unneeded #include

  9. Remove unused latch

  10. Remove support for background workers without BGWORKER_SHMEM_ACCESS.