When set, debug_pretty_print indents the messages produced by debug_print_raw_parse, debug_print_parse, debug_print_rewritten, or debug_print_plan.
At a glance
| Property | Value |
|---|---|
| Parameter | debug_pretty_print |
| Category | Error Reporting and Logging |
| Default | (see documentation) |
| Value type | boolean (on/off) |
| Change scope | Per-session (SET) |
| Available in | PostgreSQL 16, 17, 18, 19 (added in 16) |
What it does
When set, debug_pretty_print indents the messages produced by debug_print_raw_parse, debug_print_parse, debug_print_rewritten, or debug_print_plan. This results in more readable but much longer output than the “compact” format used when it is off. It is on 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_pretty_print; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'debug_pretty_print';.
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.