mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Use signalfd(2) for epoll latches.
Cut down on system calls and other overheads by reading from a signalfd instead of using a signal handler and self-pipe. Affects Linux sytems, and possibly others including illumos that implement the Linux epoll and signalfd interfaces. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@mail.gmail.com
This commit is contained in:
@ -118,6 +118,11 @@ InitPostmasterChild(void)
|
||||
/* We don't want the postmaster's proc_exit() handlers */
|
||||
on_exit_reset();
|
||||
|
||||
/* In EXEC_BACKEND case we will not have inherited BlockSig etc values */
|
||||
#ifdef EXEC_BACKEND
|
||||
pqinitmask();
|
||||
#endif
|
||||
|
||||
/* Initialize process-local latch support */
|
||||
InitializeLatchSupport();
|
||||
MyLatch = &LocalLatchData;
|
||||
@ -135,11 +140,6 @@ InitPostmasterChild(void)
|
||||
elog(FATAL, "setsid() failed: %m");
|
||||
#endif
|
||||
|
||||
/* In EXEC_BACKEND case we will not have inherited BlockSig etc values */
|
||||
#ifdef EXEC_BACKEND
|
||||
pqinitmask();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Every postmaster child process is expected to respond promptly to
|
||||
* SIGQUIT at all times. Therefore we centrally remove SIGQUIT from
|
||||
|
Reference in New Issue
Block a user