Configuration parameter

debug_print_raw_parse — PostgreSQL configuration parameter

Category Error Reporting and Logging

These parameters enable various debugging output to be emitted.

At a glance

Property Value
Parameter debug_print_raw_parse
Category Error Reporting and Logging
Default (see documentation)
Value type boolean (on/off)
Change scope Per-session (SET)
Available in PostgreSQL 19 (added in 19)

What it does

These parameters enable various debugging output to be emitted. When set, they print the resulting raw parse tree, the parse tree, the query rewriter output, or the execution plan for each executed query. These messages are emitted at LOG message level, so by default they will appear in the server log but will not be sent to the client. You can change that by adjusting client_min_messages and/or log_min_messages. These parameters are off by default.

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

Tuning guidance

This is a developer and debugging aid, not a performance knob. Leave it at the default in production; enable it only temporarily, on a non-production or carefully controlled system, while diagnosing a specific problem. Several options in this group add overhead, generate large volumes of log output, or can damage data if misused — turn them off again as soon as the investigation is done.

Reference

PostgreSQL documentation — debug_print_raw_parse.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters