Re: Raw parse tree is not dumped to log - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Raw parse tree is not dumped to log
Date
Msg-id 20250818.181315.1108260969926873357.ishii@postgresql.org
Whole thread Raw
In response to Re: Raw parse tree is not dumped to log  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Raw parse tree is not dumped to log
List pgsql-hackers
>> --- 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".

--- 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 (unlikely(Debug_print_parse))

This should be:

+    if (unlikely(Debug_print_raw_parse))

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Logical Replication of sequences
Next
From: Michael Paquier
Date:
Subject: Re: test_ddl_deparse: Rename test create_sequence_1