Parameter · Resource Usage / Memory
shared_memory_type
Selects the shared memory implementation used for the main shared memory region.
- Default:
mmap - Type: enum
- Values: sysv · mmap
- Applies: Restart required
In plain words
The main shared memory area (shared buffers and friends) can be created in two ways on Linux/Unix. The default, mmap, needs no special kernel settings. sysv is the old way that needs kernel limits raised.
For DBAs and operators
Since PostgreSQL 9.3 the main segment uses anonymous mmap plus a tiny System V segment for interlock, so kernel.shmmax/shmall no longer matter. sysv (PostgreSQL 12+) puts everything in one System V segment; it is discouraged, needs raised kernel limits, and on Linux huge_pages only works with mmap (huge pages not supported with the current "shared_memory_type" setting). Windows uses windows. There is rarely a reason to change it; some legacy monitoring that reads ipcs -m expects sysv.
How to change it
Change in postgresql.conf or ALTER SYSTEM, then restart the server.