# max_parallel_workers

> max_parallel_workers — Sets the maximum number of parallel workers that can be active at one time. Observed in PG10–19 Beta 3; its last measured boot default is 8 in PG19 Beta 3, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Sets the maximum number of parallel workers that can be active at one time.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `user` | Settable by an ordinary user |
| Unit | — | Raw unit |
| Range | `0` – `1024` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Resource Usage / Worker Processes | Upstream classification |
| Latest boot value | `8` | 8 |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG10 |
| Present in | PG10–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`b460f5d66931`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=b460f5d6693103076dc554aa7cbb96e1e53074f9) — Add max_parallel_workers GUC. |
| Commit date | 2016-12-02 |
| Discussion | — |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG10–19 Beta 3 | `8` | — | 8 |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

max_parallel_workers caps the cluster-wide number of workers simultaneously active for parallel query and maintenance. It is a pool ceiling beneath max_worker_processes.

Per-operation parameters request workers from this pool, but no slots are reserved. A plan can start with fewer workers than planned, and concurrent jobs can starve each other.

Increasing it expands potential CPU, memory, and I/O concurrency; it does not itself make plans parallel. Planner thresholds, safety checks, and max_parallel_workers_per_gather still govern query choices. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Set max_parallel_workers from a concurrency budget, not core count alone. Protect latency-sensitive OLTP from report and maintenance bursts, and verify actual Workers Planned versus Workers Launched. |
| OLAP | Analytical work can use a larger max_parallel_workers, but multiply per-node memory and I/O by concurrent statements. Benchmark throughput under realistic worker contention rather than one isolated query. |
| Small nodes | Keep max_parallel_workers conservative on a small host. More possible workers can reduce throughput through context switching and memory pressure even when a single query becomes faster. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | `4` | different | `{{ pg_max_parallel_workers }}` |
| OLAP | `7` | different | `{{ pg_max_parallel_workers }}` |
| CRIT | `4` | different | `{{ pg_max_parallel_workers }}` |
| TINY | `4` | different | `{{ pg_max_parallel_workers }}` |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG10–19 Beta 3 = 4 (dcs); OLAP: PG10–19 Beta 3 = 7 (dcs); CRIT: PG10–19 Beta 3 = 4 (dcs); TINY: PG10–19 Beta 3 = 4 (dcs). Advice, pending human review — Editorial inference, pending maintainer review: The resolved pool gives OLAP more cluster-wide parallel capacity than OLTP/crit/tiny, consistent with a throughput-oriented profile.

## Common pitfalls {#common-pitfalls}

- Treating max_parallel_workers as reserved capacity rather than an upper bound shared with other work.
- Ignoring that parallel plans multiply CPU, I/O, and work_mem-limited nodes.
- Benchmarking one query without concurrent worker contention.
- Assuming planned workers will always be launched at execution time.

## Related parameters {#related-parameters}

[`max_worker_processes`](/parameters/max-worker-processes/) · [`max_parallel_workers_per_gather`](/parameters/max-parallel-workers-per-gather/) · [`max_parallel_maintenance_workers`](/parameters/max-parallel-maintenance-workers/) · [`parallel_setup_cost`](/parameters/parallel-setup-cost/) · [`parallel_leader_participation`](/parameters/parallel-leader-participation/)

## References {#references}

- [PostgreSQL 19 Beta 3 — max_parallel_workers](https://www.postgresql.org/docs/19/runtime-config-resource.html#GUC-MAX-PARALLEL-WORKERS)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
