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