| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Let's drop support for named POSIX semaphores |
| Date: | 2026-10-26 02:20:04 |
| Message-ID: | 507767.1792981204@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
After fixing a niggling compiler warning (6e06f6281) I started to
wonder why don't we just drop support for named POSIX semaphores.
We originally put that code in for the benefit of macOS, but SysV
semaphores have been the preferred alternative on that platform since
2002, and I don't know of any other platform where named-POSIX style
was ever preferable. Moreover, our current meson configuration logic
doesn't even offer any way to select it.
We did discuss using named POSIX semaphores on OpenBSD [1], but soon
found that the performance implications were not great [2], so that
discussion never went far and is unlikely to. (Munro speculated in
that thread that maybe we could replace all this stuff with futexes,
but that's yet to bubble to the top of anyone's to-do list.) Those
results on OpenBSD pretty much mirror what you'd expect on any
platform given the constraints of the POSIX API, so it's hard to
believe that things would be different for any future platform
that suddenly gained support for this API.
So I think it's time to just drop it, as per attached. Thoughts?
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/27582.1546928073%40sss.pgh.pa.us
[2] https://www.postgresql.org/message-id/3010886.1634950831%40sss.pgh.pa.us
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Drop-support-for-named-POSIX-semaphores-the-sem_o.patch | text/x-diff | 14.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2026-10-26 02:38:47 | Re: [PATCH] Improve CREATE PUBLICATION error detail for a standalone table/schema name |
| Previous Message | Henson Choi | 2026-10-26 02:15:46 | Re: LLVM JIT: any JIT-compiled query crashes (SIGILL) on a libLLVM 19 + ASAN build |