Sets the planner’s estimate of the cost of launching parallel worker processes.
At a glance
| Property | Value |
|---|---|
| Parameter | parallel_setup_cost |
| Category | Query Planning |
| Default | 1000 |
| Value type | floating point |
| Change scope | Per-session (SET) |
| Available in | PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12) |
What it does
Sets the planner’s estimate of the cost of launching parallel worker processes. The default is 1000.
(Description quoted from the official PostgreSQL documentation.)
How to apply a change
Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.
Inspect the current value and source with SHOW parallel_setup_cost; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'parallel_setup_cost';.
Tuning guidance
Lower it to make the planner start parallel plans more readily on a box with spare cores; raise it when many small queries spawn workers and pay setup overhead for little gain.