# debug_parallel_query

> debug_parallel_query — Forces the planner's use parallel query nodes. Observed in PG16–19 Beta 3; its last measured boot default is off 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:** “Forces the planner's use parallel query nodes.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `enum` | Upstream pg_settings type |
| Context | `user` | Settable by an ordinary user |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | `off`, `on`, `regress` | — for non-enum types |
| Category | Developer Options | Upstream classification |
| Latest boot value | `off` | off |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG16 |
| Present in | PG16–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`5352ca22e001`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5352ca22e0012d48055453ca9992a9515d811291) — Rename force_parallel_mode to debug_parallel_query |
| Commit date | 2023-02-15 |
| Discussion | [thread 1](https://postgr.es/m/CAApHDvrsOi92_uA7PEaHZMH-S4Xv+MGhQWA+GrP8b1kjpS1HjQ@mail.gmail.com) |

## Default history {#default-history}

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

## How it works {#mechanism}

debug_parallel_query forces safe queries through parallel mode even when no performance benefit is expected. on adds a top-level Gather where safe; regress also hides testing-only output differences.

Parallel-safety restrictions still apply. The forced context can expose functions incorrectly marked parallel safe and can prohibit operations such as subtransactions even when no worker is ultimately available.

It replaced the earlier force_parallel_mode name in PG16. Its purpose is regression testing, not making production queries faster or overriding all parallel cost decisions. 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 | Do not tune production OLTP with debug_parallel_query. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward. |
| OLAP | Long analytical runs can amplify debug_parallel_query's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users. |
| Small nodes | Keep debug_parallel_query at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation. |
{.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 | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG16–19 Beta 3 unmodified; OLAP: PG16–19 Beta 3 unmodified; CRIT: PG16–19 Beta 3 unmodified; TINY: PG16–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Leaving debug_parallel_query enabled after the bounded diagnostic or recovery task.
- Running the experiment on the only copy of production data.
- Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.
- Treating a server that merely starts or completes a query as proof that data and behavior are correct.

## Related parameters {#related-parameters}

[`force_parallel_mode`](/parameters/force-parallel-mode/) · [`max_parallel_workers_per_gather`](/parameters/max-parallel-workers-per-gather/) · [`max_parallel_workers`](/parameters/max-parallel-workers/) · [`parallel_setup_cost`](/parameters/parallel-setup-cost/) · [`parallel_leader_participation`](/parameters/parallel-leader-participation/)

## References {#references}

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