DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Preset Options

num_os_semaphores

Shows the number of semaphores required for the server.

  • Default: 0
  • Type: integer
  • Range: 0 … 2147483647
  • Applies: Read-only

In plain words

Each PostgreSQL process slot needs a semaphore from the operating system. This shows how many the current settings require, so you can check the kernel limits before starting.

For DBAs and operators

Added in PostgreSQL 18. Computed from max_connections, autovacuum_worker_slots, max_worker_processes, max_wal_senders and a few auxiliary processes. It can be read with the server stopped: postgres -D $PGDATA -C num_os_semaphores. On Linux builds using unnamed POSIX semaphores (the default) the kernel SysV limits rarely matter; with SysV semaphores, too low SEMMNS/SEMMNI (/proc/sys/kernel/sem) makes startup fail with a "could not create semaphores" error (No space left on device).

How to change it

Fixed when PostgreSQL was built or the cluster was initialised. You can only read it.

See it in context

Postmaster Process model

Related parameters

max_connections autovacuum_worker_slots max_worker_processes max_wal_senders

All Preset Options parameters