<div dir="ltr">Hi,<div>I think its an mandatory feature to monitor <b>both</b> DB nodes states every x sec. in order to avoid human mistakes (or errors).</div><div>in the other hand, if the secondary node gets shutdown (stopping Postgres) , the pgpool does reports the node in state 3.</div><div><br></div><div><br></div><div>Thanks,</div><div>Shay C</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 3:18 PM, Muhammad Usama <span dir="ltr">&lt;<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Mar 15, 2016 at 5:59 PM, Shay Cohavi <span dir="ltr">&lt;<a href="mailto:cohavisi@gmail.com" target="_blank">cohavisi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Muhammad,<br>Thanks for your replay...<br><br>I&#39;m familiar with the <b>pcp_promote_node</b> command and I&#39;m using it when necessary!<br>but <b><font size="4">if</font></b> (by mistake) someone promoted manually the secondary node....does the pgpool notice it and change its state? report an error? get it out of the pool?<br></div></blockquote><div><br></div></span><div>No pgpool does not continuously monitor the node&#39;s master or standby status. It only scans the node master or secondary state at startup or when the attached master goes down.</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>Thnaks<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 2:23 PM, Muhammad Usama <span dir="ltr">&lt;<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Mar 15, 2016 at 5:13 PM, Shay Cohavi <span dir="ltr">&lt;<a href="mailto:cohavisi@gmail.com" target="_blank">cohavisi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi,<div>During my tests on my pgpool setup (2 nodes is master/slave and streaming replication), I have notice a troubled response via the pgpool server.</div><div><br></div><div>1. DB nodes in master/slave state (streaming replication):</div><div><div># psql -U postgres -h 192.168.15.59 -p 9999 -c &quot;show pool_nodes;&quot;</div><div>Password for user postgres:</div><div> node_id | hostname | port | status | lb_weight |  role</div><div>---------+----------+------+--------+-----------+---------</div><div> 0       | 1.1.1.55 | 5432 | 2      | 0.500000  | primary</div><div> 1       | 1.1.1.56 | 5432 | 2      | 0.500000  | standby</div><div>(2 rows)</div><div><br></div></div><div>2. <b>test scenario</b> --- for some reason, if the &#39;standby&#39; node (1.1.1.56) is being promoted<b> manually by user </b>(touch trigger file); the pgpool doesn&#39;t change its state and not put it outside of the pool.....(split brain)</div><div><br></div><div>on <a href="http://1.1.1.56" target="_blank">1.1.1.56</a>:</div><div># touch /home/postgres/databases/my_db/trigger<br></div><div><br></div><div>#  psql -U postgres -h 192.168.15.59 -p 9999 -c &quot;show pool_nodes;&quot;</div><div><div> node_id | hostname | port | status | lb_weight |  role</div><div>---------+----------+------+--------+-----------+---------</div><div> 0<span style="white-space:pre-wrap">        </span> | 1.1.1.55 | 5432 | 2      | 0.500000  | primary</div><div> 1<span style="white-space:pre-wrap">        </span> | 1.1.1.56 | 5432 | 2      | 0.500000  | standby</div></div><div><br></div><div>Does the pgpool monitor the <b>standby</b> node after pgpool startup??</div></div></blockquote><div><br></div></span><div>If you want to promote a standby node to the master node you need to do it manually. <i>pcp_promote_node</i> is used for the purpose.</div><div><a href="http://www.pgpool.net/docs/latest/pgpool-en.html#pcp_promote_node" target="_blank">http://www.pgpool.net/docs/latest/pgpool-en.html#pcp_promote_node</a></div><div><br></div><div>Regards</div><div>Muhammad Usama</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><div dir="ltr"><div><br></div><div><br></div><div><br></div><div>can you please advice?</div><div><br></div><div>Thanks,</div><div>cohavisi</div><div> </div></div>
<br></span>_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>