From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
---|---|
To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Raw parse tree is not dumped to log |
Date: | 2025-08-18 02:08:19 |
Message-ID: | 43ebcd1c-6e38-4012-a944-1f242f595fc9@gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Tatsuo san,
Thank you very much for your review.
On 2025/8/16 13:56, Tatsuo Ishii wrote:
> I have looked into this patch.
>
> diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
> index 20ccb2d6b54..4370e8307f2 100644
> --- a/doc/src/sgml/config.sgml
> +++ b/doc/src/sgml/config.sgml
>
> Around line 7407 of config.sgml:
>
>
> I think you should add "the resulting raw parse tree" before "the
> resulting parse tree" since the paragraph refers to the each item in
> the varlistentry above.
Updated.
> --- a/src/backend/tcop/postgres.c
> +++ b/src/backend/tcop/postgres.c
> @@ -649,6 +649,10 @@ pg_parse_query(const char *query_string)
>
> TRACE_POSTGRESQL_QUERY_PARSE_DONE(query_string);
>
> + if (Debug_print_raw_parse)
> + elog_node_display(LOG, "raw parse tree", raw_parsetree_list,
> + Debug_pretty_print);
> +
>
> I'm tempted to change "if (Debug_print_raw_parse)" to:
>
> if (unlikely(Debug_print_raw_parse))
>
> But as we have similar if-statements elsewhere
> (e.g. Debug_print_parse), maybe we should keep it for a separate
> commit.
>
I have added "unlikely" here. For other places, I can use a separate
commit to add "unlikely".
Best regards,
--
Chao Li (Evan)
------------------------------
HighGo Software Inc.
https://www.highgo.com/
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Add-support-for-dumping-raw-parse-tree-with-debug.patch | text/plain | 6.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2025-08-18 02:19:06 | Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options |
Previous Message | Thomas Munro | 2025-08-18 02:01:47 | Re: Memory leak of SMgrRelation object on standby |