Configuration parameter

min_dynamic_shared_memory — PostgreSQL configuration parameter

Category Resource Consumption Default 0 (none Change scope Postmaster

Specifies the amount of memory that should be allocated at server startup for use by parallel queries.

At a glance

Property Value
Parameter min_dynamic_shared_memory
Category Resource Consumption
Default 0
Value type integer
Change scope Server restart required (postgresql.conf)
Available in PostgreSQL 14, 15, 16, 17, 18, 19 (added in 14)

What it does

Specifies the amount of memory that should be allocated at server startup for use by parallel queries. When this memory region is insufficient or exhausted by concurrent queries, new parallel queries try to allocate extra shared memory temporarily from the operating system using the method configured with dynamic_shared_memory_type, which may be slower due to memory management overheads. Memory that is allocated at startup with min_dynamic_shared_memory is affected by the huge_pages setting on operating systems where that is supported, and may be more likely to benefit from larger pages on operating systems where that is managed automatically. The default value is 0 (none). This parameter can only be set at server start.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Set it in postgresql.conf (or with ALTER SYSTEM) and restart the server — this parameter cannot change without a restart.

Inspect the current value and source with SHOW min_dynamic_shared_memory; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'min_dynamic_shared_memory';.

Tuning guidance

This parameter is rarely a performance lever. Leave it at the default unless you have a specific, documented reason to change it, change it on one session or one role/database first, and confirm the effect with pg_settings and your own measurements before rolling it out cluster-wide.

Reference

PostgreSQL documentation — min_dynamic_shared_memory.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters