[pgpool-hackers: 4316] Re: minimal parser and multi-statement query

Tatsuo Ishii ishii at sraoss.co.jp
Fri Apr 14 14:08:09 JST 2023


Hi Usama,

I think you are wondering how the patch affects the performance. So I
did some quick testing using pgbench. In summary, with this commit I
see 3-4% performance degradation.

pgbench -n -S -p 11000 -c 10 -j 5 -T 300 test

without the patch the result is around 29,000 tps on my laptop while
with it the result is around 28,000. 28000/29000 = 0.9655.

What do you think?

>>>>> I temporarily turns off the optimization and adds regression test for
>>>>> that in master branch.
>>>>>     
>>>>> Hopefully before releasing 4.5 we find a way to determine whether the
>>>>> query is a multi-statement query or not in less expensive way. And if
>>>>> it is not a multi-statement query, we can turn on the optimization.
>>>> 
>>>> Maybe we use this in the PostgreSQL source code:
>>>> 
>>>> src/fe_utils/psqlscan.c
>>> 
>>> Attached is the patch to import psqlscan.c (and other necessary
>>> files).
>> 
>> Attached is the v2 patch.
>> 
>> - Never use minimal parser if pgpool is in replication or snapshot
>>   isolation mode. Before introducing psqlscan, we did that way. I just
>>   forgot it.
>> 
>> - unbreak "make dist".
> 
> I have pushed the v2 patch to master branch.
> https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=48da8715bf403965507eef0321c0ab10054ac71c
> 
> Although this could be regarded as a bug fix, I hesitate to back patch
> to stable branches because the patch size is relatively
> large. Comments/suggestions?
> 
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS LLC
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers


More information about the pgpool-hackers mailing list