Drop support for named POSIX semaphores (the sem_open() kind). Commit 72a3902a6 introduced support for sem_open() semaphores partially as proof of concept of the flexibility of the semaphore API it introduced, but mostly because that was then the only standardized semaphore API supported by macOS. However, macOS has had SysV-style semaphores since 2002, and we long ago switched to preferring those on that platform.
Named POSIX semaphores are less nice than unnamed or SysV style, first because they don't work with EXEC_BACKEND, and second because they typically consume a file descriptor (or some other resource) per semaphore per backend, i.e. O(N^2) cost for N backends. Hence there are no platforms where they are the preferred approach, and we might as well drop our long-untested code to support them. Author: Tom Lane <[email protected]> Reviewed-by: shihao zhong <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/70c4a57b64d39c526eb4c44a925eb92a6e56f3c5 Modified Files -------------- configure | 77 ++------------------- configure.ac | 22 ++---- doc/src/sgml/runtime.sgml | 6 +- src/backend/port/meson.build | 2 +- src/backend/port/posix_sema.c | 157 ++++-------------------------------------- src/include/pg_config.h.in | 3 - src/template/darwin | 13 ---- 7 files changed, 26 insertions(+), 254 deletions(-)
