<div dir="ltr">Hi Ishii-San<div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 11, 2017 at 11:01 AM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Usama,<br>
<br>
I have modified watchdog regression script to test out your quorum<br>
aware failover patch. Here are differences from the existing script.<br>
<br>
- Install streaming replication primary and standby DB node (before<br>
  raw mode + only 1 node). This is necessary to test an ordinary<br>
  failover scenario. Current script creates only one DB node. So if we<br>
  get the node down, the cluster goes into &quot;all db node down&quot;<br>
  status. I already reported possible problem with the status up<br>
  thread and waiting for the answer from Usama.<br>
<br>
- Add one more pgpool-II node &quot;standby2&quot;. For this purpose, new<br>
  configuration file &quot;standby2.conf&quot; added.<br>
<br>
- Add new test scenario: &quot;fake&quot; failover. By using the infrastructure<br>
  I have created to simulate the communication path between standby2<br>
  and DB node 1. The test checks if such a error raised a failover<br>
  request from standby2, but it is safely ignored.<br>
<br>
- Add new test scenario: &quot;real&quot; failover. Shutting down DB node 1,<br>
  which should raise a failover request.<br>
<br>
- Modify test.sh to agree with the changes above.<br></blockquote><div><br></div><div><br class="gmail-Apple-interchange-newline">Thanks for testing and test script patch. I think the changes and test scenario is spot on but I think we should add a new test case</div><div>with these modifications and keep the 004_watchdog test case in the same shape as-well, This will help us to identify watchdog issues more</div><div>swiftly.</div><div><br></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>
Since the modification requires your quorum patch committed, I haven&#39;t<br>
push the change yet.<br></blockquote><div><br></div><div>I was worried about the scenario mentioned above and now identified it as an existing issue, So will commit the patch tomorrow.</div><div><br></div><div>Thanks</div><div>Best regardsd</div><div>Muhammad Usama</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">
<div class="gmail-HOEnZb"><div class="gmail-h5"><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_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
<br>
&gt; I have tested the patch a little bit using 004 watchdog regression<br>
&gt; test.  After the test ends, I manually started master and standby<br>
&gt; Pgpool-II.<br>
&gt;<br>
&gt; 1) Stop master PostgreSQL. Since there&#39;s only one PostgreSQL is<br>
&gt; configured, I expected:<br>
&gt;<br>
&gt; psql: ERROR:  pgpool is not accepting any new connections<br>
&gt; DETAIL:  all backend nodes are down, pgpool requires at least one valid node<br>
&gt; HINT:  repair the backend nodes and restart pgpool<br>
&gt;<br>
&gt; but master Pgpool-II replies:<br>
&gt;<br>
&gt; psql: FATAL:  failed to create a backend connection<br>
&gt; DETAIL:  executing failover on backend<br>
&gt;<br>
&gt; Is this normal?<br>
&gt;<br>
&gt; 2) I shutdown the master node to see if the standby escalates.<br>
&gt;<br>
&gt; After shutting down the master, I see this using pcp_watchdog_info:<br>
&gt;<br>
&gt; pcp_watchdog_info -p 11105<br>
&gt; localhost:11100 Linux tishii-CF-SX3HE4BP localhost 11100 21104 4 MASTER<br>
&gt; localhost:11000 Linux tishii-CF-SX3HE4BP localhost 11000 21004 10 SHUTDOWN<br>
&gt;<br>
&gt; Seems ok but I want to confirm.<br>
&gt;<br>
&gt; master and standby pgpool logs attached.<br>
&gt;<br>
&gt; Best regards,<br>
&gt; --<br>
&gt; Tatsuo Ishii<br>
&gt; SRA OSS, Inc. Japan<br>
&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;<br>
&gt;&gt; On Fri, Aug 25, 2017 at 5:05 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; &gt; On Fri, Aug 25, 2017 at 12:53 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; Usama,<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; With the new patch, the regression tests all passed.<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Glad to hear that :-)<br>
&gt;&gt;&gt; &gt; Did you had a chance to look at the node quarantine state I added. What<br>
&gt;&gt;&gt; are<br>
&gt;&gt;&gt; &gt; your thoughts on that ?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;m going to look into the patch this weekend.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Many thanks<br>
&gt;&gt;<br>
&gt;&gt; Best Regards<br>
&gt;&gt; Muhammad Usama<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Best regards,<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Tatsuo Ishii<br>
&gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; Hi Ishii-San<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; Please fine the updated patch, It fixes the regression issue you were<br>
&gt;&gt;&gt; &gt;&gt; &gt; facing and also another bug which I encountered during my testing.<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; -- Adding Yugo to the thread,<br>
&gt;&gt;&gt; &gt;&gt; &gt; Hi Yugo,<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; Since you are an expert of watchdog feature, So I thought you might<br>
&gt;&gt;&gt; have<br>
&gt;&gt;&gt; &gt;&gt; &gt; something to say especially regarding the discussion points mentioned<br>
&gt;&gt;&gt; in<br>
&gt;&gt;&gt; &gt;&gt; &gt; the initial mail.<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; Thanks<br>
&gt;&gt;&gt; &gt;&gt; &gt; Best Regards<br>
&gt;&gt;&gt; &gt;&gt; &gt; Muhammad Usama<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; On Thu, Aug 24, 2017 at 11:25 AM, Muhammad Usama &lt;<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</a>&gt;<br>
&gt;&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; On Thu, Aug 24, 2017 at 4:34 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>
&gt;&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; After applying the patch, many of regression tests fail. It seems<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; pgpool.conf.sample has bogus comment which causes the pgpool.conf<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; parser to complain parse error.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; 2017-08-24 08:22:36: pid 6017: FATAL:  syntex error in configuration<br>
&gt;&gt;&gt; &gt;&gt; file<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &quot;/home/t-ishii/work/pgpool-II/<wbr>current/pgpool2/src/test/regre<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; ssion/tests/004.watchdog/<wbr>standby/etc/pgpool.conf&quot;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; 2017-08-24 08:22:36: pid 6017: DETAIL:  parse error at line 568 &#39;*&#39;<br>
&gt;&gt;&gt; &gt;&gt; token<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; = 8<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; Really sorry, Somehow I overlooked the sample config file changes I<br>
&gt;&gt;&gt; made<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; at the last minute.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; Will send you the updated version.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; Thanks<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; Best Regards<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; Muhammad Usama<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Best regards,<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; --<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Tatsuo Ishii<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Usama,<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Thanks for the patch. I am going to review it.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; In the mean time when I apply your patch, I got some trailing<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; whitespace errors. Can you please fix them?<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; /home/t-ishii/quorum_aware_<wbr>failover.diff:470: trailing<br>
&gt;&gt;&gt; whitespace.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; /home/t-ishii/quorum_aware_<wbr>failover.diff:485: trailing<br>
&gt;&gt;&gt; whitespace.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; /home/t-ishii/quorum_aware_<wbr>failover.diff:564: trailing<br>
&gt;&gt;&gt; whitespace.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; /home/t-ishii/quorum_aware_<wbr>failover.diff:1428: trailing<br>
&gt;&gt;&gt; whitespace.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; /home/t-ishii/quorum_aware_<wbr>failover.diff:1450: trailing<br>
&gt;&gt;&gt; whitespace.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; warning: squelched 3 whitespace errors<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; warning: 8 lines add whitespace errors.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Best regards,<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; --<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Tatsuo Ishii<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; SRA OSS, Inc. Japan<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Hi<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; I was working on the new feature to make the backend node<br>
&gt;&gt;&gt; failover<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; quorum<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; aware and on the half way through the implementation I also added<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; majority consensus feature for the same.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; So please find the first version of the patch for review that<br>
&gt;&gt;&gt; makes<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; backend node failover consider the watchdog cluster quorum status<br>
&gt;&gt;&gt; &gt;&gt; and<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; seek<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; the majority consensus before performing failover.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Changes in the Failover mechanism with watchdog.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; For this new feature I have modified the Pgpool-II&#39;s existing<br>
&gt;&gt;&gt; &gt;&gt; failover<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; mechanism with watchdog.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Previously as you know when the Pgpool-II require to perform a<br>
&gt;&gt;&gt; node<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; operation (failover, failback, promote-node) with the watchdog.<br>
&gt;&gt;&gt; The<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; watchdog used to propagated the failover request to all the<br>
&gt;&gt;&gt; &gt;&gt; Pgpool-II<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; nodes<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; in the watchdog cluster and as soon as the request was received<br>
&gt;&gt;&gt; by<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; node, it used to initiate the local failover and that failover<br>
&gt;&gt;&gt; was<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; synchronised on all nodes using the distributed locks.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Now Only the Master node performs the failover.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; The attached patch changes the mechanism of synchronised<br>
&gt;&gt;&gt; failover,<br>
&gt;&gt;&gt; &gt;&gt; and<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; now<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; only the Pgpool-II of master watchdog node performs the failover,<br>
&gt;&gt;&gt; &gt;&gt; and<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; all<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; other standby nodes sync the backend statuses after the master<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Pgpool-II is<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; finished with the failover.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Overview of new failover mechanism.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- If the failover request is received to the standby watchdog<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; node(from<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; local Pgpool-II), That request is forwarded to the master<br>
&gt;&gt;&gt; watchdog<br>
&gt;&gt;&gt; &gt;&gt; and<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Pgpool-II main process is returned with the<br>
&gt;&gt;&gt; &gt;&gt; FAILOVER_RES_WILL_BE_DONE<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; return code. And upon receiving the FAILOVER_RES_WILL_BE_DONE<br>
&gt;&gt;&gt; from<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; watchdog for the failover request the requesting Pgpool-II moves<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; forward<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; without doing anything further for the particular failover<br>
&gt;&gt;&gt; command.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- Now when the failover request from standby node is received by<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; master watchdog, after performing the validation, applying the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; consensus<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; rules the failover request is triggered on the local Pgpool-II .<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- When the failover request is received to the master watchdog<br>
&gt;&gt;&gt; node<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; from<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; the local Pgpool-II (On the IPC channel) the watchdog process<br>
&gt;&gt;&gt; inform<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Pgpool-II requesting process to proceed with failover (provided<br>
&gt;&gt;&gt; all<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover rules are satisfied).<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- After the failover is finished on the master Pgpool-II, the<br>
&gt;&gt;&gt; &gt;&gt; failover<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; function calls the *wd_failover_end*() which sends the backend<br>
&gt;&gt;&gt; sync<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; required message to all standby watchdogs.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- Upon receiving the sync required message from master watchdog<br>
&gt;&gt;&gt; &gt;&gt; node<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; all<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Pgpool-II sync the new statuses of each backend node from the<br>
&gt;&gt;&gt; master<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; watchdog.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *No More Failover locks*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Since with this new failover mechanism we do not require any<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; synchronisation and guards against the execution of<br>
&gt;&gt;&gt; &gt;&gt; failover_commands<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; by<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; multiple Pgpool-II nodes, So the patch removes all the<br>
&gt;&gt;&gt; distributed<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; locks<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; from failover function, This makes the failover simpler and<br>
&gt;&gt;&gt; faster.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *New kind of Failover operation NODE_QUARANTINE_REQUEST*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; The patch adds the new kind of backend node operation<br>
&gt;&gt;&gt; &gt;&gt; NODE_QUARANTINE<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; which<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; is effectively same as the NODE_DOWN, but with node_quarantine<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover_command is not triggered.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; The NODE_DOWN_REQUEST is automatically converted to the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; NODE_QUARANTINE_REQUEST when the failover is requested on the<br>
&gt;&gt;&gt; &gt;&gt; backend<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; node<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; but watchdog cluster does not holds the quorum.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; This means in the absence of quorum the failed backend nodes are<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; quarantined and when the quorum becomes available again the<br>
&gt;&gt;&gt; &gt;&gt; Pgpool-II<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; performs the failback operation on all quarantine nodes.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; And again when the failback is performed on the quarantine<br>
&gt;&gt;&gt; backend<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; node the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover function does not trigger the failback_command.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Controlling the Failover behaviour.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; The patch adds three new configuration parameters to configure<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; failover<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; behaviour from user side.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *failover_when_quorum_exists*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; When enabled the failover command will only be executed when the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; watchdog<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; cluster holds the quorum. And when the quorum is absent and<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover_when_quorum_exists is enabled the failed backend nodes<br>
&gt;&gt;&gt; will<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; get<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; quarantine until the quorum becomes available again.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; disabling it will enable the old behaviour of failover commands.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *failover_require_consensus*<wbr>This new configuration parameter<br>
&gt;&gt;&gt; can be<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; used to<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; make sure we get the majority vote before performing the<br>
&gt;&gt;&gt; failover on<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; node. When *failover_require_consensus* is enabled then the<br>
&gt;&gt;&gt; &gt;&gt; failover is<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; only performed after receiving the failover request from the<br>
&gt;&gt;&gt; &gt;&gt; majority<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; or<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Pgpool-II nodes.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; For example in three nodes cluster the failover will not be<br>
&gt;&gt;&gt; &gt;&gt; performed<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; until<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; at least two nodes ask for performing the failover on the<br>
&gt;&gt;&gt; particular<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; backend node.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; It is also worthwhile to mention here that<br>
&gt;&gt;&gt; &gt;&gt; *failover_require_consensus*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; only works when failover_when_quorum_exists is enables.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *enable_multiple_failover_<wbr>requests_from_node*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; This parameter works in connection with<br>
&gt;&gt;&gt; *failover_require_consensus*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; config. When enabled a single Pgpool-II node can vote for<br>
&gt;&gt;&gt; failover<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; multiple<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; times.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; For example in the three nodes cluster if one Pgpool-II node<br>
&gt;&gt;&gt; sends<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover request of particular node twice that would be counted<br>
&gt;&gt;&gt; as<br>
&gt;&gt;&gt; &gt;&gt; two<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; votes in favour of failover and the failover will be performed<br>
&gt;&gt;&gt; even<br>
&gt;&gt;&gt; &gt;&gt; if<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; we<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; do not get a vote from other two nodes.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; And when *enable_multiple_failover_<wbr>requests_from_node* is<br>
&gt;&gt;&gt; disabled,<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Only<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; the first vote from each Pgpool-II will be accepted and all other<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; subsequent votes will be marked duplicate and rejected.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; So in that case we will require a majority votes from distinct<br>
&gt;&gt;&gt; &gt;&gt; nodes to<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; execute the failover.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Again this *enable_multiple_failover_<wbr>requests_from_node* only<br>
&gt;&gt;&gt; &gt;&gt; becomes<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; effective when both *failover_when_quorum_exists* and<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *failover_require_consensus* are enabled.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Controlling the failover: The Coding perspective.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Although the failover functions are made quorum and consensus<br>
&gt;&gt;&gt; aware<br>
&gt;&gt;&gt; &gt;&gt; but<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; there is still a way to bypass the quorum conditions, and<br>
&gt;&gt;&gt; &gt;&gt; requirement<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; of<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; consensus.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; For this the patch uses the existing request_details flags in<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; POOL_REQUEST_NODE to control the behaviour of failover.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Here are the newly added flags values.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *REQ_DETAIL_WATCHDOG*:<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Setting this flag while issuing the failover command will not<br>
&gt;&gt;&gt; send<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover request to the watchdog. But this flag may not be<br>
&gt;&gt;&gt; useful in<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; any<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; other place than where it is already used.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Mostly this flag can be used to avoid the failover command from<br>
&gt;&gt;&gt; &gt;&gt; going<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; to<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; watchdog that is already originated from watchdog. Otherwise we<br>
&gt;&gt;&gt; can<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; end up<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; in infinite loop.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *REQ_DETAIL_CONFIRMED*:<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Setting this flag will bypass the *failover_require_consensus*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; configuration and immediately perform the failover if quorum is<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; present.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; This flag can be used to issue the failover request originated<br>
&gt;&gt;&gt; from<br>
&gt;&gt;&gt; &gt;&gt; PCP<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; command.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *REQ_DETAIL_UPDATE*:<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; This flag is used for the command where we are failing back the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; quarantine<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; nodes. Setting this flag will not trigger the failback_command.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Some conditional flags used:*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; I was not sure about the configuration of each type of failover<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; operation.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; As we have three main failover operations NODE_UP_REQUEST,<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; NODE_DOWN_REQUEST, and PROMOTE_NODE_REQUEST<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; So I was thinking do we need to give the configuration option to<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; users,<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; if they want to enable/disable quorum checking and consensus for<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; individual<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover operation type.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; For example: is it a practical configuration where a user would<br>
&gt;&gt;&gt; &gt;&gt; want to<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; ensure quorum while preforming NODE_DOWN operation while does not<br>
&gt;&gt;&gt; &gt;&gt; want<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; it<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; for NODE_UP.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; So in this patch I use three compile time defines to enable<br>
&gt;&gt;&gt; disable<br>
&gt;&gt;&gt; &gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; individual failover operation, while we can decide on the best<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; solution.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; NODE_UP_REQUIRE_CONSENSUS: defining it will enable quorum<br>
&gt;&gt;&gt; checking<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; feature<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; for NODE_UP_REQUESTs<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; NODE_DOWN_REQUIRE_CONSENSUS: defining it will enable quorum<br>
&gt;&gt;&gt; checking<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; feature for NODE_DOWN_REQUESTs<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; NODE_PROMOTE_REQUIRE_<wbr>CONSENSUS: defining it will enable quorum<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; checking<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; feature for PROMOTE_NODE_REQUESTs<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Some Point for Discussion:*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Do we really need to check ReqInfo-&gt;switching flag before<br>
&gt;&gt;&gt; enqueuing<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover request.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; While working on the patch I was wondering why do we disallow<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; enqueuing the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover command when the failover is already in progress? For<br>
&gt;&gt;&gt; &gt;&gt; example<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; in<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *pcp_process_command*() function if we see the<br>
&gt;&gt;&gt; *Req_info-&gt;switching*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; flag<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; set we bailout with the error instead of enqueuing the command.<br>
&gt;&gt;&gt; Is<br>
&gt;&gt;&gt; &gt;&gt; is<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; really necessary?<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Do we need more granule control over each failover operation:*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; As described in section &quot;Some conditional flags used&quot; I want the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; opinion on<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; do we need configuration parameters in pgpool.conf to enable<br>
&gt;&gt;&gt; disable<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; quorum<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; and consensus checking on individual failover types.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Which failover should be mark as Confirmed:*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; As defined in the above section of REQ_DETAIL_CONFIRMED, We can<br>
&gt;&gt;&gt; mark<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover request to not need consensus, currently the requests<br>
&gt;&gt;&gt; from<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; the PCP<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; commands are fired with this flag. But I was wondering there may<br>
&gt;&gt;&gt; be<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; more<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; places where we many need to use the flag.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; For example I currently use the same confirmed flag when<br>
&gt;&gt;&gt; failover is<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; triggered because of *replication_stop_on_mismatch*<wbr>.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; I think we should think this flag for each place of failover,<br>
&gt;&gt;&gt; like<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; when the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; failover is triggered<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; because of health_check failure.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; because of replication mismatch<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; because of backend_error<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; e.t.c<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *Node Quarantine behaviour.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; What do you think about the node quarantine used by this patch.<br>
&gt;&gt;&gt; Can<br>
&gt;&gt;&gt; &gt;&gt; you<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; think of some problem which can be caused by this?<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *What should be the default values for each newly added config<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; parameters.*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; *TODOs*<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- Updating the documentation is still todo. Will do that once<br>
&gt;&gt;&gt; every<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; aspect<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; of the feature will be finalised.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- Some code warnings and cleanups are still not done.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- I am still little short on testing<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; -- Regression test cases for the feature<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Thoughts and suggestions are most welcome.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Thanks<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Best regards<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt;&gt; Muhammad Usama<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; pgpool-hackers mailing list<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; <a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; &gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/<wbr>listinfo/pgpool-hackers</a><br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt;<br>
</div></div></blockquote></div><br></div></div></div>