Use EVFILT_SIGNAL for kqueue latches.

Thomas Munro <tmunro@postgresql.org>

Commit: 6148656a0be1c6245fbcfcbbeb87541f1b173162
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2021-03-01T01:20:04Z
Releases: 14.0
Use EVFILT_SIGNAL for kqueue latches.

Cut down on system calls and other overheads by waiting for SIGURG
explicitly with kqueue instead of using a signal handler and self-pipe.
Affects *BSD and macOS systems.

This leaves only the poll implementation with a signal handler and the
traditional self-pipe trick.

Discussion: https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@mail.gmail.com

Files

PathChange+/−
src/backend/storage/ipc/latch.c modified +38 −17

Discussion