From 1145f7752238730d71732430652125a748a5baa2 Mon Sep 17 00:00:00 2001 From: shihao zhong Date: Sun, 25 Oct 2026 23:47:36 -0400 Subject: [PATCH] Remove leftovers of named POSIX semaphore support IPCProtection and the fcntl.h and sys/stat.h includes in posix_sema.c were only used by the sem_open() code. Also update the list of platforms that use POSIX semaphores in runtime.sgml. --- doc/src/sgml/runtime.sgml | 4 ++-- src/backend/port/posix_sema.c | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 666900f5d0f..0371b383417 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -715,8 +715,8 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such In addition a significant number of semaphores, which can be either System V or POSIX style, are created at server startup. Currently, - POSIX semaphores are used on Linux and FreeBSD systems while other - platforms use System V semaphores. + POSIX semaphores are used on Linux, FreeBSD, Solaris, illumos and AIX, + while other platforms use System V semaphores. diff --git a/src/backend/port/posix_sema.c b/src/backend/port/posix_sema.c index e01aa35e77e..2ac7f3266a0 100644 --- a/src/backend/port/posix_sema.c +++ b/src/backend/port/posix_sema.c @@ -22,11 +22,9 @@ */ #include "postgres.h" -#include #include #include #include -#include #include "miscadmin.h" #include "storage/ipc.h" @@ -48,8 +46,6 @@ typedef struct PGSemaphoreData #define PG_SEM_REF(x) (&(x)->sem_padded.pgsem) -#define IPCProtection (0600) /* access/modify by user only */ - static PGSemaphore sharedSemas; /* array of PGSemaphoreData in shared memory */ static int numSems; /* number of semas acquired so far */ static int maxSems; /* allocated size of above arrays */ -- 2.37.1 (Apple Git-137.1)