{"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"}],"derived_content_hash":"a4a2bddc9b953d2d77c2ec94f064dc724b774f36cab4450e53f6de0fb1e1aa36","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:4d3db760d07b20bfaed514971378ea8db648ab8aaeef7bf557c4a2087df4062f","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"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"],"repair_provenance":{"original_source_revision":"english-manuals:4043a4a2855d0cbab79f08d2a988d967f964f6d5e01e6a37dc66d92e778ebfae","receipt_sha256":"64d52cc329bd391e82cd42c19aba7d3b5cf82a04d4b42e3d52254d27741c696e","repair":"wiki-repair-20261023"},"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":"wiki-repair-20261023:4d3db760d07b20bfaed514971378ea8db648ab8aaeef7bf557c4a2087df4062f","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"debug_pretty_print","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"debug_pretty_print","SourceRevision":"wiki-repair-20261023:4d3db760d07b20bfaed514971378ea8db648ab8aaeef7bf557c4a2087df4062f","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.","description_zh":"当被设置时，debug_pretty_print 会缩进由 debug_print_parse、debug_print_rewritten 或 debug_print_plan 产生的输出。这将导致比关闭参数时使用的“紧凑”模式可读性更强但是更长的输出。它默认是打开的。","description_zh_html":"\u003cp\u003e\n        当被设置时，\u003ccode class=\"varname\"\u003edebug_pretty_print\u003c/code\u003e 会缩进由 \u003ccode class=\"varname\"\u003edebug_print_parse\u003c/code\u003e、\u003ccode class=\"varname\"\u003edebug_print_rewritten\u003c/code\u003e 或\n        \u003ccode class=\"varname\"\u003edebug_print_plan\u003c/code\u003e 产生的输出。这将导致比关闭参数时使用的\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e紧凑\u003c/span\u003e”\u003c/span\u003e模式可读性更强但是更长的输出。它默认是打开的。\n       \u003c/p\u003e","doc":{"anchor":"GUC-DEBUG-PRETTY-PRINT","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","slug":"18"},"doc_html":"\u003cp\u003e\n        When set, \u003ccode class=\"varname\"\u003edebug_pretty_print\u003c/code\u003e indents the messages\n        produced by \u003ccode class=\"varname\"\u003edebug_print_parse\u003c/code\u003e,\n        \u003ccode class=\"varname\"\u003edebug_print_rewritten\u003c/code\u003e, or\n        \u003ccode class=\"varname\"\u003edebug_print_plan\u003c/code\u003e.  This results in more readable\n        but much longer output than the \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ecompact\u003c/span\u003e”\u003c/span\u003e format used when\n        it is off.  It is on by default.\n       \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","version":"18.7"},{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"68c010254e1859ec0b76f06a563babd51a6c38997f1242e35e4c6b649724b1cb","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"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","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-logging.html","sha256":"a322f5293f10e348b5fc5dca98fdb6af52462723a215b8701c3b9d933e2933b4"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"bool","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-DEBUG-PRETTY-PRINT","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","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\u003e\n        When set, \u003ccode\u003edebug_pretty_print\u003c/code\u003e indents the messages\n        produced by \u003ccode\u003edebug_print_parse\u003c/code\u003e,\n        \u003ccode\u003edebug_print_rewritten\u003c/code\u003e, or\n        \u003ccode\u003edebug_print_plan\u003c/code\u003e.  This results in more readable\n        but much longer output than the \u003cspan\u003e“\u003cspan\u003ecompact\u003c/span\u003e”\u003c/span\u003e format used when\n        it is off.  It is on by default.\n       \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:4d3db760d07b20bfaed514971378ea8db648ab8aaeef7bf557c4a2087df4062f","ContentHash":"e66048da1091da515a01c02d020a6d626709fbee1bb631ffb3e6eadb0f310c63","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":"en","Fallback":false,"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","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
