<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2019 at 5:10 AM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thank you Usama!<br>
<br>
I have updated the 4.1 release note to reflect this patch.<br>
Compiled HTML files can be seen at:<br>
<a href="http://tatsuo-ishii.github.io/pgpool-II/current/release-4-1.html" rel="noreferrer" target="_blank">http://tatsuo-ishii.github.io/pgpool-II/current/release-4-1.html</a></blockquote><div><br></div><div>Many thanks Ishii-San</div><div><br></div><div>Best Regards</div><div>Muhammad Usama</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
From: Muhammad Usama <<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a>><br>
Subject: [pgpool-committers: 5948] pgpool: Multiple performance enhancements especially for of the large<br>
Date: Thu, 01 Aug 2019 20:27:36 +0000<br>
Message-ID: <<a href="mailto:E1htHfk-0006TZ-63@gothos.postgresql.org" target="_blank">E1htHfk-0006TZ-63@gothos.postgresql.org</a>><br>
<br>
> Multiple performance enhancements especially for of the large<br>
> INSERT and UPDATE statements<br>
> <br>
> Pgpool-II only needs very little information, especially for the INSERT and<br>
> UPDATE statements to decide where it needs to send the query.<br>
> For example: In master-slave mode, for the INSERT statements Pgpool-II only<br>
> requires the relation name referenced in the statement while it doesn't care<br>
> much about the column values and other parameters. But since the parser we use<br>
> in Pgpool-II is taken from PostgreSQL source which parses the complete query<br>
> including the value lists which seems harmless for smaller statements but in<br>
> case of INSERT and UPDATE with lots of column values and large data in value<br>
> items, consumes significant time.<br>
> <br>
> So the idea here is to short circuit the INSERT and UPDATE statement parsing as<br>
> soon as we have the required information. For that purpose, the commit adds the<br>
> second minimal parser that gets invoked in master-slave mode and tries to<br>
> extract the performance for large INSERT and UPDATE statements.<br>
> <br>
> Apart from the second parser addition, following changes aiming towards the<br>
> performance enhancements are also part of the commit.<br>
> <br>
> 1-Some of the if statements in pool_where_to_send() function are re-arranged to<br>
> make sure the more expensive functions calls, pattern_compare()<br>
> and pool_has_function_call() should only be made when they are<br>
> absolutely necessary.<br>
> <br>
> 2- Eliminates the raw_parser() calls in case of un-recognized queries. Instead<br>
> of invoking the parser on "dummy read" and "dummy write" statements, the commit<br>
> adds the functions to return the pre-built parse_trees for these dummy queries.<br>
> <br>
> 3-- strlen() call is removed from scanner_init() function and is passed to it<br>
> as an argument. The reason being we already have the query length in most cases<br>
> before invoking the parser so why waste CPU cycles on it. Again this becomes<br>
> significant in case of large query strings.<br>
> <br>
> 4- Removes some of the unnecessary calls of pool_is_likely_select() function.<br>
> <br>
> Branch<br>
> ------<br>
> master<br>
> <br>
> Details<br>
> -------<br>
> <a href="https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=310c5c4a289cbe6cee01abef7d2e7bc3550944fb" rel="noreferrer" target="_blank">https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=310c5c4a289cbe6cee01abef7d2e7bc3550944fb</a><br>
> <br>
> Modified Files<br>
> --------------<br>
> Makefile.in | 1 +<br>
> configure | 59 +<br>
> <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> | 12 +<br>
> doc.ja/Makefile.in | 1 +<br>
> doc.ja/src/Makefile.in | 1 +<br>
> doc.ja/src/sgml/Makefile.in | 1 +<br>
> doc/Makefile.in | 1 +<br>
> doc/src/Makefile.in | 1 +<br>
> doc/src/sgml/Makefile.in | 1 +<br>
> src/Makefile.in | 1 +<br>
> src/context/pool_query_context.c | 42 +-<br>
> src/include/Makefile.in | 1 +<br>
> src/include/parser/gramparse.h | 6 +<br>
> src/include/parser/parser.h | 5 +-<br>
> src/include/parser/scanner.h | 1 +<br>
> src/include/protocol/pool_proto_modules.h | 2 -<br>
> src/libs/Makefile.in | 1 +<br>
> src/libs/pcp/Makefile.in | 1 +<br>
> src/parser/Makefile.am | 10 +-<br>
> src/parser/Makefile.in | 37 +-<br>
> src/parser/README | 49 +<br>
> src/parser/gram.c | 3255 +-<br>
> src/parser/gram.y | 7 +-<br>
> src/parser/gram_minimal.c | 46971 +++++++++++++++++++<br>
> src/parser/gram_minimal.h | 1053 +<br>
> src/parser/gram_minimal.y | 16403 +++++++<br>
> src/parser/gram_template.y | 16492 +++++++<br>
> src/parser/parser.c | 84 +-<br>
> src/parser/scan.c | 2 +-<br>
> src/parser/scan.l | 2 +-<br>
> src/protocol/pool_process_query.c | 2 +-<br>
> src/protocol/pool_proto_modules.c | 35 +-<br>
> .../tests/010.rewrite_timestamp/timestamp/main.c | 2 +-<br>
> .../regression/tests/017.node_0_is_down/test.sh | 4 +-<br>
> src/tools/Makefile.in | 1 +<br>
> src/tools/pcp/Makefile.in | 1 +<br>
> src/tools/pgenc/Makefile.in | 1 +<br>
> src/tools/pgmd5/Makefile.in | 1 +<br>
> src/tools/pgproto/Makefile.in | 1 +<br>
> src/watchdog/Makefile.in | 1 +<br>
> 40 files changed, 82852 insertions(+), 1700 deletions(-)<br>
> <br>
</blockquote></div></div>