Configuration parameter

max_parallel_workers — PostgreSQL Configuration Parameter

Category Parallelism Default 8 Unit boolean / enum / numeric Change scope Per-session (SET)

Total parallel workers available cluster-wide.

At a glance

Property Value
Parameter max_parallel_workers
Category Parallelism
Default 8
Value type boolean / enum / numeric
Change scope Per-session (SET)

What it does

Maximum number of workers the system supports for parallel queries, drawn from the max_worker_processes pool.

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 max_parallel_workers; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'max_parallel_workers';.

Tuning guidance

Set near your core count for analytics boxes. Ensure max_worker_processes is large enough to also cover background workers and logical replication.

Reference

PostgreSQL documentation — Parallelism configuration.

Was this helpful?

← All configuration parameters