BTW, I did a little bit of performance testing using current OpenBSD (7.6), and it looks like they partially fixed the performance issues I saw with their named POSIX semaphores back in 2021. "pgbench -S" seems to show TPS rates right about on par with a SysV-sema build. There is still a measurable hit in connection startup time, about 18.8ms versus 16.7ms according to "pgbench -S -C" (with max_connections set to 100). But that's probably not something you'd notice if you weren't looking for it. Postmaster start/stop time is still awful with max_connections = 10000, but how many people are likely to try that? (It's a couple of seconds at 1000, so I detect a strong whiff of an O(N^2) issue in there somewhere.)
So maybe we should think about switching OpenBSD to named semas by default. One good thing about that is we'd have some buildfarm coverage for that code path --- right now there are no platforms that use it. We'd still want to make the other changes I mentioned for NetBSD's sake, though. regards, tom lane