| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Drop support for named POSIX semaphores (the sem_open() kind). |
| Date: | 2026-11-13 23:11:03 |
| Message-ID: | E1xS0QB-00000000cQZ-2xW2@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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 <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: shihao zhong <zhong950419(at)gmail(dot)com>
Discussion: https://postgr.es/m/507767.1792981204@sss.pgh.pa.us
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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Manu | 2026-11-14 01:12:56 | Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned |
| Previous Message | Melanie Plageman | 2026-11-13 21:54:46 | pgsql: Exclude new pages from VACUUM reltuples estimates |