pgsql: Allow to log raw parse tree.

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow to log raw parse tree.
Date: 2025-09-05 22:52:55
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow to log raw parse tree.

This commit allows to log the raw parse tree in the same way we
currently log the parse tree, rewritten tree, and plan tree.

To avoid unnecessary log noise for users not interested in this
detail, a new GUC option, "debug_print_raw_parse", has been added.

When starting the PostgreSQL process with "-d N", and N is 3 or higher,
debug_print_raw_parse is enabled automatically, alongside
debug_print_parse.

Author: Chao Li <lic(at)highgo(dot)com>
Reviewed-by: Tender Wang <tndrwang(at)gmail(dot)com>
Reviewed-by: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Reviewed-by: John Naylor <johncnaylorls(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAEoWx2mcO0Gpo4vd8kPMAFWeJLSp0MeUUnaLdE1x0tSVd-VzUw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/06473f5a344df8c9594ead90a609b86f6724cff8

Modified Files
--------------
doc/src/sgml/config.sgml | 12 +++++++++---
doc/src/sgml/rules.sgml | 1 +
src/backend/tcop/postgres.c | 7 +++++++
src/backend/utils/misc/guc_parameters.dat | 6 ++++++
src/backend/utils/misc/guc_tables.c | 1 +
src/backend/utils/misc/postgresql.conf.sample | 1 +
src/include/utils/guc.h | 1 +
7 files changed, 26 insertions(+), 3 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-09-06 00:52:02 Re: pgsql: Allow to log raw parse tree.
Previous Message Andres Freund 2025-09-05 16:26:12 pgsql: bufmgr: Remove freelist, always use clock-sweep