DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Resource Usage / Memory

min_dynamic_shared_memory

Amount of dynamic shared memory reserved at startup.

  • Default: 0
  • Type: integer (MB)
  • Range: 0 … max (2147483647)
  • Applies: Restart required

In plain words

Normally each parallel query asks the operating system for a fresh shared memory segment. This setting reserves a pool at server start that parallel queries use first. It avoids repeated allocations, can use huge pages, and sidesteps a too-small /dev/shm.

For DBAs and operators

Added in PostgreSQL 14, default 0 (no pool). The pool is part of the main shared memory segment, so it counts toward shared_memory_size and is backed by huge pages when huge_pages is in use. When the pool is exhausted or too small, queries fall back to creating segments with dynamic_shared_memory_type.

Useful when: many short parallel queries make segment setup measurable; /dev/shm is small (containers) and you cannot change it; or you want parallel hash tables in huge pages. Size it from the largest concurrent parallel-hash needs (roughly work_mem × hash_mem_multiplier × participants per query × concurrent parallel queries), e.g. 256 MB–1 GB. The memory is reserved permanently even when idle.

How to change it

Change in postgresql.conf or ALTER SYSTEM, then restart the server.

See it in context

Parallel query Memory architecture Parallel and background workers

Related parameters

dynamic_shared_memory_type huge_pages max_parallel_workers shared_buffers

All Resource Usage parameters