{"Entry":{"collection":"guc","key":"debug_print_raw_parse","name":"debug_print_raw_parse","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Reporting and Logging / What to Log","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"18","status":"added","to":"19"}],"content_hash":"069bbe20b723508c689f0553289e1f790ecd7853ed2925517be1bb4f5bdd635e","context":"","default_changed_in":[],"default_history":[{"from":"19","to":"19","value":"off"}],"editorial":{"advice":{"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.","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.","small":"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."},"mechanism":["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."],"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."],"references":[{"title":"PostgreSQL 19 Beta 4: debug_print_raw_parse","url":"https://www.postgresql.org/docs/19/runtime-config-logging.html#GUC-DEBUG-PRINT-RAW-PARSE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["debug_print_parse","debug_print_rewritten","debug_print_plan","debug_pretty_print","log_min_messages"],"summary":"debug_print_raw_parse — Logs each query's raw parse tree. Observed in PG19 Beta 4; its last measured boot default is off in PG19 Beta 4, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"19","group":"Reporting and Logging","group_slug":"logging","imported_at":"2026-09-30T00:40:56.934925+08:00","intro_commit":{"authored_at":"2025-09-06T07:49:51+09:00","discussion":["https://postgr.es/m/CAEoWx2mcO0Gpo4vd8kPMAFWeJLSp0MeUUnaLdE1x0tSVd-VzUw%40mail.gmail.com"],"hash":"06473f5a344df8c9594ead90a609b86f6724cff8","subject":"Allow to log raw parse tree.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=06473f5a344df8c9594ead90a609b86f6724cff8"},"key":"debug_print_raw_parse","last_version":"20","max_val":"","min_val":"","name":"debug_print_raw_parse","position":93,"present_in":["19","20"],"short_desc":"These parameters enable various debugging output to be emitted.","short_desc_zh":"","source_rev":"english-manuals:03bf48436951ddc593d7fb29f31a38e53b6810213ee2981b97dd75a94ff82c53","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"debug_print_raw_parse","SourceDatabase":"center","Version":"20","SourceTable":"guc","SourceKey":"debug_print_raw_parse","SourceRevision":"english-manuals:03bf48436951ddc593d7fb29f31a38e53b6810213ee2981b97dd75a94ff82c53","Facts":{"boot_val":null,"category":"What to Log","context":"","description":"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.","doc":{"anchor":"GUC-DEBUG-PRINT-RAW-PARSE","file":"runtime-config-logging.html","lang":"en","sha256":"2a5d4075a753b17259ee33e4681fb5133d151fb4226c96ef69f1543e3ce473f4","slug":"devel"},"documented":true,"enumvals":[],"extra_desc":"","lang":"en","max_val":null,"metadata_version":"","min_val":null,"name":"debug_print_raw_parse","short_desc":"","source":"english-manual","unit":"","vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-DEBUG-PRINT-RAW-PARSE","file":"runtime-config-logging.html","lang":"en","sha256":"2a5d4075a753b17259ee33e4681fb5133d151fb4226c96ef69f1543e3ce473f4","slug":"devel"}},"MeasuredEvidence":{"metadata_version":""}},"Text":{"Collection":"guc","Key":"debug_print_raw_parse","SourceDatabase":"pgweb","Version":"20","Locale":"zh-Hans","Title":"debug_print_raw_parse","Summary":"","BodyHTML":"\u003cp\u003e这些参数会启用多种调试输出。设置后，它们会为每个执行的查询打印生成的原始解析树、解析树、查询重写器输出或执行计划。这些消息以\u003ccode\u003eLOG\u003c/code\u003e消息级别发出，因此默认会出现在服务器日志中，但不会发送给客户端。你可以通过调整\u003ca href=\"/docs/devel/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES\" rel=\"nofollow\"\u003eclient_min_messages\u003c/a\u003e和/或\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-MESSAGES\" rel=\"nofollow\"\u003elog_min_messages\u003c/a\u003e来改变这种情况。这些参数默认是关闭的。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"d49425b29c377f1e0205e4c39537364c9f4577dd8b82ee1f5170dca2cb983903","Payload":{"carried_from":"19","carry_reason":"手册不含 pg_settings 事实，沿用 19","doc_html":"\u003cp\u003e这些参数会启用多种调试输出。设置后，它们会为每个执行的查询打印生成的原始解析树、解析树、查询重写器输出或执行计划。这些消息以\u003ccode class=\"literal\"\u003eLOG\u003c/code\u003e消息级别发出，因此默认会出现在服务器日志中，但不会发送给客户端。你可以通过调整\u003ca href=\"/docs/devel/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES\"\u003eclient_min_messages\u003c/a\u003e和/或\u003ca href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-MIN-MESSAGES\"\u003elog_min_messages\u003c/a\u003e来改变这种情况。这些参数默认是关闭的。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
