{"Entry":{"collection":"guc","key":"debug_pretty_print","name":"debug_pretty_print","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Reporting and Logging / What to Log","category_zh":"","changed_in":[],"changes":[{"documentation_changed":true,"fields":{},"from":"7.4","status":"changed","to":"8.0"},{"documentation_changed":true,"fields":{},"from":"8.1","status":"changed","to":"8.2"},{"documentation_changed":true,"fields":{},"from":"8.3","status":"changed","to":"8.4"},{"documentation_changed":true,"fields":{},"from":"9.6","status":"changed","to":"10"},{"documentation_changed":true,"fields":{},"from":"18","status":"changed","to":"19"}],"content_hash":"b4ccd28463c9e1a7573e55660814cd1243d058d0f67cf7777419a4936440ffa1","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"on"}],"editorial":{"advice":{"olap":"Do not use debug_pretty_print as a substitute for EXPLAIN on analytical SQL; capture a targeted plan instead of dumping every internal tree.","oltp":"Do not tune or enable debug_pretty_print globally in production. If server-developer diagnostics require it, isolate one session, bound its duration, and route the resulting logs safely.","small":"Leave debug_pretty_print at its normal default. Verbose internal trees can exhaust a small node's log I/O and disk unexpectedly."},"mechanism":["debug_pretty_print indents parse and plan tree displays. It changes only the indentation of internal parse and plan tree dumps produced by the debug_print_* switches.","debug_pretty_print is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.","The debug_print_* switches feed the normal server logging path, so log_min_messages, log_destination, and collector capacity determine whether the output is retained safely."],"pitfalls":["Changing debug_pretty_print in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.","Leaving an internal-tree dump enabled globally and overwhelming log I/O, storage, or ingestion.","Treating debug output as a stable public format or as a substitute for targeted EXPLAIN diagnostics.","Changing debug_pretty_print globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: debug_pretty_print","url":"https://www.postgresql.org/docs/19/runtime-config-logging.html#GUC-DEBUG-PRETTY-PRINT"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["debug_print_parse","debug_print_plan","debug_print_rewritten","log_min_messages","client_min_messages"],"summary":"debug_pretty_print is the PostgreSQL setting that indents parse and plan tree displays."},"enumvals":[],"first_version":"7.4","group":"Reporting and Logging","group_slug":"logging","imported_at":"2026-09-30T00:40:56.90832+08:00","intro_commit":{},"key":"debug_pretty_print","last_version":"20","max_val":"","min_val":"","name":"debug_pretty_print","position":90,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"When set, debug_pretty_print indents the messages produced by debug_print_parse, debug_print_rewritten, or debug_print_plan.","short_desc_zh":"","source_rev":"english-manuals:4043a4a2855d0cbab79f08d2a988d967f964f6d5e01e6a37dc66d92e778ebfae","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"debug_pretty_print","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"debug_pretty_print","SourceRevision":"english-manuals:4043a4a2855d0cbab79f08d2a988d967f964f6d5e01e6a37dc66d92e778ebfae","Facts":{"boot_val":"on","category":"Reporting and Logging / What to Log","context":"user","description":"When set, debug_pretty_print indents the messages produced by 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.","doc":{"anchor":"GUC-DEBUG-PRETTY-PRINT","file":"runtime-config-logging.html","lang":"en","sha256":"93c48c522a72fca19705c4c91a71e951eae653662008eee2e4a9a74a11127fde","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"debug_pretty_print","short_desc":"Indents parse and plan tree displays.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-DEBUG-PRETTY-PRINT","file":"runtime-config-logging.html","lang":"en","sha256":"93c48c522a72fca19705c4c91a71e951eae653662008eee2e4a9a74a11127fde","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"debug_pretty_print","SourceDatabase":"center","Version":"18","Locale":"en","Title":"debug_pretty_print","Summary":"When set, debug_pretty_print indents the messages produced by 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.","BodyHTML":"\u003cp\u003eWhen set, debug_pretty_print indents the messages produced by 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.\u003c/p\u003e","SourceRevision":"english-manuals:4043a4a2855d0cbab79f08d2a988d967f964f6d5e01e6a37dc66d92e778ebfae","ContentHash":"55e6a70403f2ba1192ad2a7dc43efeb3c28b60078181099629c7a88132d0ef08","Payload":{"description":"When set, debug_pretty_print indents the messages produced by 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."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
