<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 20, 2019 at 5:32 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; 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">From: Bo Peng &lt;<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>&gt;<br>
Subject: [pgpool-hackers: 3480] Proposal: Simplify WATCHDOG host configurations.<br>
Date: Thu, 19 Dec 2019 15:29:42 +0900<br>
Message-ID: &lt;<a href="mailto:20191219152942.854fb365a05419557ba6fa93@sraoss.co.jp" target="_blank">20191219152942.854fb365a05419557ba6fa93@sraoss.co.jp</a>&gt;<br>
<br>
&gt; Currently the configuration parameters for WATCHDOG such as:<br>
&gt; <br>
&gt; ---<br>
&gt; wd_hostname<br>
&gt; wd_port<br>
&gt; wd_heartbeat_port<br>
&gt; heartbeat_destination<br>
&gt; heartbeat_destination_port<br>
&gt; other_pgpool_hostname<br>
&gt; other_pgpool_port<br>
&gt; ---<br>
&gt; <br>
&gt; wd_* are the host and port information about the host itself,<br>
&gt; heartbeat_destination* and other_pgpool_* are the other pgpool information <br>
&gt; in the cluster.<br>
&gt; <br>
&gt; This complicates the configuration.<br>
&gt; <br>
&gt; To simplify WATCHDOG configurations,<br>
&gt; I would like to use a common configuration file for each pgpool node,<br>
&gt; and users just copy the configuration file to another node without editing.<br>
&gt; <br>
&gt; To implement, each pgpool should detect its own information and sets it to wd_ *,<br>
&gt; Then, set other pgpool&#39;s information to heartbeat_destination* and other_pgpool_*.<br>
<br>
I am afraid detecting pgpool&#39;s own information is not so easy. For<br>
example if we use hostname for it&#39;s purpose, it may be different from<br>
wd_hostname if the host which pgpool runs on has multiple<br>
IP/hostname. We need to assign an artificial &quot;host id&quot; to each pgpool<br>
node any way. If so, I think it would be better to eliminate:<br>
<br>
&gt; heartbeat_destination<br>
&gt; heartbeat_destination_port<br>
&gt; other_pgpool_hostname<br>
&gt; other_pgpool_port<br>
<br>
completely.<br>
<br>
Instead we will have &quot;pgpool_node_id&quot; (an integer starting from 0) for<br>
each pgpool node, then we will have:<br>
<br>
wd_hostname0<br>
wd_port0<br>
wd_heartbeat_port0<br>
wd_hostname1<br>
wd_port1<br>
wd_heartbeat_port1<br>
wd_hostname2<br>
wd_port2<br>
wd_heartbeat_port2<br>
:<br>
:<br>
<br>
Then pgpool.conf could be identical except pgpool_node_id part. Even<br>
we could have pgpool_id.conf file separate from pgpool.conf so that<br>
all pgpool.conf files are identical on each pgpool host.<br></blockquote><div><br></div><div>IMHO this seems a better approach, and I believe zookeeper also follows a similar configuration mechanism and identifies the</div><div>local server configuration using the separate myid file.</div><div><br></div><div>Also, I am thinking about what if we use the [<i><b>hostname: port</b></i>] format for specifying the watchdog node instead of using the</div><div>separate configuration parameter for hostname (wd_hostname[x]) and port (wd_port[x]) </div><div>For example:</div><div><br></div><div>wd_server1 = host1:port1</div><div>wd_server2 = host2:port2<br></div><div>..</div><div><br></div><div>Moreover, we can also eliminate the wd_heartbeat_port[x] configuration parameter as well by using</div><div>[<i><b>hostname:port:port</b></i>] format (where the second port corresponds to the heartbead_port number while the first one configures the wd_port number</div><div><br></div><div><br></div><div>Best regards</div><div>Muhammad Usama</div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div></div>