<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 7:31 AM, <span class="" id=":3ij.1" tabindex="-1">Tatsuo</span> <span class="" id=":3ij.2" tabindex="-1">Ishii</span> <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank"><span class="" id=":3ij.3" tabindex="-1">ishii</span>@<span class="" id=":3ij.4" tabindex="-1">postgresql</span>.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Usama,<br>
<br>
It seems doc changes are not in your commit.<br></blockquote><div><br></div><div>Yes, I will cover the documentation part after finishing the coding changes as a separate commit.</div><div><br></div><div>Best regards</div><div>Muhammad <span class="" id=":3ij.5" tabindex="-1">Usama</span></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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>
<div class="HOEnZb"><div class="h5"><br>
&gt; Adding new SHOW command for pgpool-II configuration parameters.<br>
&gt;<br>
&gt; This is the next in series patch to add the SHOW and SET commands for pgpool-II<br>
&gt; configuration parameters, similar to the PostgreSQL&#39;s SET and SHOW commands for<br>
&gt; GUC variables. This patch adds the show variable functionality and for that it<br>
&gt; adds a new syntax in pgpool which is similar to PostgreSQL&#39;s show variable<br>
&gt; syntax with an addition of pgpool keyword at the start to distinguish the<br>
&gt; pgpool&#39;s show command from PG&#39;s.  Another reason for using the changed syntax<br>
&gt; from the PG&#39;s show command is that there are some configuration parameter names<br>
&gt; that are same in PostgreSQL and pgpool-II like &quot;port&quot;, &quot;log_min_messages&quot;...<br>
&gt; And if we use the same syntax without any difference, we would have no way of<br>
&gt; telling if the command is referring to the pgpool-II or PG&#39;s config parameter.<br>
&gt;<br>
&gt; Although on most parts the PGPOOL SHOW command works similar to the<br>
&gt; PG&#39;s SHOW command but below are some differences.<br>
&gt;<br>
&gt; -- syntax:<br>
&gt; PGPOOL SHOW config_var_name;<br>
&gt; PGPOOL SHOW all;<br>
&gt;<br>
&gt; -- config parameter with index:<br>
&gt; Since unlike PostgreSQL pgpool-II also have config parameters that can be<br>
&gt; assigned with multiple values using the index number at the end of a parameter<br>
&gt; name (e.g. backend_port12). For all these type of variables if the index number<br>
&gt; is supplied in PGPOOL SHOW command than the single value corresponding to that<br>
&gt; index will be printed otherwise if index is not present at the end of variable<br>
&gt; name the pgpool show command will print the values at all indexes for that<br>
&gt; config parameter.<br>
&gt;<br>
&gt; -- group parameters.<br>
&gt; There are some configuration parameters in pgpool-II that can be considered as<br>
&gt; part of a logical group. For example the parameters to configure the backend<br>
&gt; servers and parameters to configure the watchdog nodes. Providing the logical<br>
&gt; group name in pgpool show command will print the values of all config parameters<br>
&gt; belonging to that particular group.<br>
&gt;<br>
&gt; For example:<br>
&gt; postgres=# pgpool show backend;<br>
&gt; item           |             value             |                  description<br>
&gt; -------------------------+-------------------------------+-----------------------------------------------<br>
&gt; backend_hostname0       | 127.0.0.1                     | hostname or IP address of PostgreSQL backend.<br>
&gt; backend_port0           | 5434                          | port number of PostgreSQL backend.<br>
&gt; backend_weight0         | 0                             | load balance weight of backend.<br>
&gt; backend_data_directory0 | /var/lib/pgsql/data           | data directory of the backend.<br>
&gt; backend_flag0           | ALLOW_TO_FAILOVER             | Controls various backend behavior.<br>
&gt; backend_hostname1       | 192.168.0.1                   | hostname or IP address of PostgreSQL backend.<br>
&gt; backend_port1           | 5432                          | port number of PostgreSQL backend.<br>
&gt; backend_weight1         | 1                             | load balance weight of backend.<br>
&gt; backend_data_directory1 | /home/usama/work/installed/pg | data directory of the backend.<br>
&gt; backend_flag1           | ALLOW_TO_FAILOVER             | Controls various backend behavior.<br>
&gt; (10 rows)<br>
&gt;<br>
&gt; Here in the above example the &quot;backend&quot; is the group name and &#39;pgpool show backend&#39;<br>
&gt; command lists the values of all parameters belonging to the backend group.<br>
&gt;<br>
&gt; This patch creates three logical config parameter groups.<br>
&gt; 1- &quot;backend&quot;: This group combines all the parameters related to the backend<br>
&gt; server configurations<br>
&gt; 2-  &quot;other_pgpool&quot;: This group contains the parameters for remote watchdog<br>
&gt; node configurations.<br>
&gt; 3- &quot;heartbeat&quot;: Config parameters related to watchdog lifecheck node<br>
&gt; configurations are part of this logical group.<br>
&gt;<br>
&gt; Apart from adding the new show variable command there are few other under the<br>
&gt; hood changes and design decision made by this patch that requires a mentioning.<br>
&gt;<br>
&gt; -- The patch adds the new log level (FRONTEND_ONLY_ERROR) to elog API, that acts<br>
&gt; as a non error type, message internally for pgpool-II (the code is returned to<br>
&gt; the caller unlike the ERROR message where elog API performs a long jump) but is<br>
&gt; forwarded to the front-end client as an ERROR message followed by the<br>
&gt; ReadyForQuery message.<br>
&gt; This new ereport(FRONTEND_ONLY_ERROR,...) can be used to terminate the current<br>
&gt; query from a client with an error while keeping the client session intact.<br>
&gt;<br>
&gt; -- for the new syntax the patch uses the same parse node structure VariableShowStmt<br>
&gt; used by PG&#39;s SHOW command but with the different node tag.<br>
&gt; i.e. T_PgpoolVariableShowStmt instead of T_VariableShowStmt. This is specifically<br>
&gt; done to make sure we make a minimum amount of changes in parser imported from the<br>
&gt; PostgreSQL. Otherwise, keeping the parser of pgpool in-sync with PostgreSQL would<br>
&gt; require more merging efforts.<br>
&gt;<br>
&gt; Branch<br>
&gt; ------<br>
&gt; master<br>
&gt;<br>
&gt; Details<br>
&gt; -------<br>
&gt; <a href="http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=25dc79e478c24aa884a7be3eb5bc2af51dc6f396" rel="noreferrer" target="_blank">http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=25dc79e478c24aa884a7be3eb5bc2af51dc6f396</a><br>
&gt;<br>
&gt; Modified Files<br>
&gt; --------------<br>
&gt; src/config/pool_config_variables.c         |  1119 +-<br>
&gt; src/include/parser/kwlist.h                |     1 +<br>
&gt; src/include/parser/nodes.h                 |     6 +-<br>
&gt; src/include/pool_config_variables.h        |    74 +-<br>
&gt; src/include/utils/elog.h                   |    15 +-<br>
&gt; src/include/utils/pool_process_reporting.h |     2 +<br>
&gt; src/parser/gram.c                          | 49612 +++++++++++++--------------<br>
&gt; src/parser/gram.h                          |   716 +-<br>
&gt; src/parser/gram.y                          |    17 +-<br>
&gt; src/protocol/pool_proto_modules.c          |    13 +<br>
&gt; src/utils/error/elog.c                     |    44 +-<br>
&gt; src/utils/pool_process_reporting.c         |   103 +<br>
&gt; 12 files changed, 25514 insertions(+), 26208 deletions(-)<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; pgpool-committers mailing list<br>
&gt; <a href="mailto:pgpool-committers@pgpool.net">pgpool-committers@pgpool.net</a><br>
&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-committers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-committers</a><br>
</div></div></blockquote></div><br></div></div>