Re: Raw parse tree is not dumped to log

2025-09-02 Thread Tatsuo Ishii
> The individual runs have quite a bit of variation. It's a known behavior of pgbench. > It's good to cross check results against known facts. If my napkin > math is right, a ~1% speedup for ~60ktps/s amounts to saving ~160ns > per query. It's not plausible that forcing the compiler's hand for >

Re: Raw parse tree is not dumped to log

2025-09-01 Thread John Naylor
On Mon, Sep 1, 2025 at 8:13 AM Tatsuo Ishii wrote: > > > Branch alignment surely shouldn't matter in a function that is called > > once per query? > > According to my test, it seems using unlikely() makes a small but > non-negligible performance improvement over the code without > unlikely() for s

Re: Raw parse tree is not dumped to log

2025-08-31 Thread Tatsuo Ishii
Hi Chao Li, >> v5 patch looks good to me. If there's no objection, I plan to push the >> patch in early September. >> > > Hi Tatsuo san, > > Thank you much very for your support. You are welcome. Can you please rebase v5 patch? It does not apply to current master anymore. $ git apply ~/v5-00

Re: Raw parse tree is not dumped to log

2025-08-31 Thread Tatsuo Ishii
> + if (unlikely(Debug_print_raw_parse)) > > Branch alignment surely shouldn't matter in a function that is called > once per query? According to my test, it seems using unlikely() makes a small but non-negligible performance improvement over the code without unlikely() for small queries. Test m

Re: Raw parse tree is not dumped to log

2025-08-31 Thread Chao Li
Hi Tatsuo san, Rebased v6 is attached. Chao Li (Evan) - HighGo Software Co., Ltd. https://www.highgo.com/ Tatsuo Ishii 于2025年9月1日周一 10:13写道: > Hi Chao Li, > > >> v5 patch looks good to me. If there's no objection, I plan to push the > >> patch in early September. > >> > >

Re: Raw parse tree is not dumped to log

2025-08-31 Thread John Naylor
On Wed, Aug 20, 2025 at 8:26 AM Tatsuo Ishii wrote: > Thanks for updating the patch. > v5 patch looks good to me. If there's no objection, I plan to push the > patch in early September. + if (unlikely(Debug_print_raw_parse)) Branch alignment surely shouldn't matter in a function that is called o

Re: Raw parse tree is not dumped to log

2025-08-19 Thread Chao Li
> On Aug 20, 2025, at 09:25, Tatsuo Ishii wrote: >> > v5 patch looks good to me. If there's no objection, I plan to push the > patch in early September. > Hi Tatsuo san, Thank you much very for your support. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/

Re: Raw parse tree is not dumped to log

2025-08-19 Thread Tatsuo Ishii
> On 2025/8/18 17:13, Tatsuo Ishii wrote: >> + if (unlikely(Debug_print_parse)) >> >> This should be: >> >> +if (unlikely(Debug_print_raw_parse)) > > My bad! Such a stupid mistake. Fixed. And I did a test by turning > on/off the flag in postgres.conf, and raw parse tree is only dumped > whe

Re: Raw parse tree is not dumped to log

2025-08-18 Thread Chao Li
On 2025/8/18 17:13, Tatsuo Ishii wrote: + if (unlikely(Debug_print_parse)) This should be: + if (unlikely(Debug_print_raw_parse)) My bad! Such a stupid mistake. Fixed. And I did a test by turning on/off the flag in postgres.conf, and raw parse tree is only dumped when "debug_print

Re: Raw parse tree is not dumped to log

2025-08-18 Thread Tatsuo Ishii
>> --- 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, >>

Re: Raw parse tree is not dumped to log

2025-08-17 Thread Chao Li
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 Aroun

Re: Raw parse tree is not dumped to log

2025-08-15 Thread Tatsuo Ishii
> Updated the patch to v3 version. 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: These parameters enable

Re: Raw parse tree is not dumped to log

2025-08-05 Thread Chao Li
Updated the patch to v3 version. Chao Li (Evan) -- HighGo Software Inc. https://www.highgo.com/ Chao Li 于2025年8月5日周二 14:25写道: > CommitFests patch created: https://commitfest.postgresql.org/patch/5946/ > > 2025年8月4日 16:17,Chao Li 写道: > > I just noticed that my IDE a

Re: Raw parse tree is not dumped to log

2025-08-04 Thread Chao Li
CommitFests patch created: https://commitfest.postgresql.org/patch/5946/ > 2025年8月4日 16:17,Chao Li 写道: > > I just noticed that my IDE auto formatted guc_tables.c, which generated a lot > of unnecessary diffs. Recreated the patch, and attach the v2 version. > > Chao Li (Evan) >

Re: Raw parse tree is not dumped to log

2025-08-04 Thread Chao Li
I just noticed that my IDE auto formatted guc_tables.c, which generated a lot of unnecessary diffs. Recreated the patch, and attach the v2 version. Chao Li (Evan) -- HighGo Software Inc. https://www.highgo.com/ Chao Li 于2025年8月4日周一 15:57写道: > Oh, I forget to attache

Re: Raw parse tree is not dumped to log

2025-08-04 Thread Chao Li
Oh, I forget to attached the patch file, here comes it. Chao Li (Evan) -- HighGo Software Inc. https://www.highgo.com/ Chao Li 于2025年8月4日周一 15:53写道: > I was reviewing some patches today, and during debugging the patches, I > wanted to view raw parse tree, so I had t

Re: Raw parse tree is not dumped to log

2025-08-04 Thread Chao Li
I was reviewing some patches today, and during debugging the patches, I wanted to view raw parse tree, so I had to apply my local patch of dumping raw parse for every review, which was so inconvenient. You may argue that raw parse tree might not be useful for every reviews. I am still ramping up P

Re: Raw parse tree is not dumped to log

2025-08-01 Thread Chao Li
Hi Tatsuo, thanks for pointing out the past conversation. So, the requirement got 1 more vote from me. But to not make noise to people who are not interested in raw parse tree, I guess it's better to add a new option "debug_print_raw_parse". For people who are interested in raw parse tree, turning

Re: Raw parse tree is not dumped to log

2025-08-01 Thread Tatsuo Ishii
> Before submitting this trivial patch, I still want to confirm with the > community if it's intentional to not dump raw parse tree? For your reference, here's the past discussion: https://www.postgresql.org/message-id/flat/20080730.172949.132921436.t-ishii%40sraoss.co.jp Best regards, -- Tatsuo

Re: Raw parse tree is not dumped to log

2025-07-31 Thread Tender Wang
Chao Li 于2025年8月1日周五 13:44写道: > Hi, > > When "debug_print_parse" is "on", only the Query structure tree is > dumped, the raw parse tree is not dumped to log. In some cases, viewing raw > parse trees are also helpful. It is very hard to view a tree by watching > variables in a debugger, so I added