debug_print_raw_parse
Fact — official short description: “Logs each query’s raw parse tree.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG19 Beta 3 |
| Present in | PG19 Beta 3 |
| Removed in | No |
| Introduction commit | 06473f5a344d — Allow to log raw parse tree. |
| Commit date | 2025-09-06 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG19 Beta 3 | off |
— | off |
How it works
PostgreSQL describes debug_print_raw_parse as follows: “Logs each query’s raw parse tree.” It can be changed per session, which makes plan or behavior comparisons possible without changing every workload. The atlas measures it in PG19 Beta 3; boot_val is the compiled or initialized baseline, not proof of a running cluster’s effective setting.
The raw parse tree is emitted before parse analysis, rewriting, planning, and execution. Messages use LOG level; debug_pretty_print changes formatting, while client_min_messages and log_min_messages determine where they are visible. Output can be very large and can expose query text structure.
Read it together with debug_print_parse, debug_print_rewritten, debug_print_plan, debug_pretty_print. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default until a reproducible operational need is demonstrated. Test under representative concurrency and inspect logs, latency, and the related settings before changing cluster-wide policy. |
| OLAP | Evaluate the setting with representative long-running and batch work. Measure total runtime, resource use, log volume, and failure behavior across the whole job rather than one isolated operation. |
| Small nodes | Minimize overrides and document rollback. A small system has less room for extra logging, workers, memory, or retained WAL, so validate the change with explicit resource limits. |
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 | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG19 Beta 3 unmodified; OLAP: PG19 Beta 3 unmodified; CRIT: PG19 Beta 3 unmodified; TINY: PG19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating the measured boot_val for debug_print_raw_parse as proof of the effective value on an initialized or managed cluster.
- Applying a change as though it were immediate while pg_settings reports user context.
- Changing this setting in isolation without checking the linked limits, observability, and rollback path.
- Depending on beta behavior in production without retesting the PostgreSQL 19 final release.
Related parameters
debug_print_parse · debug_print_rewritten · debug_print_plan · debug_pretty_print · log_min_messages
References
- PostgreSQL 19 Beta 3 — debug_print_raw_parse
- PostgreSQL 19 release notes
- Machine-readable GUC export