<div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>   I had couple of queries as below :</div><div><br></div><div><div dir="ltr" class="gmail_attr">On Thu, May 16, 2019 at 2:17 AM Muhammad Usama &lt;<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 10, 2019 at 6:38 PM Lakshmi Raghavendra &lt;<a href="mailto:lakshmiym108@gmail.com" target="_blank">lakshmiym108@gmail.com</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"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>I am trying pgpool for automatic faliover on my postgresql cluster using the watchdog feature</div><div>Wanted to know a couple of things </div><div>1. Are there any hooks when pgpool re-elects next pgpool master ? wanted to run some customization during this time</div></div></div></blockquote><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Pgpool executes the user provided commands at the time of acquiring and releasing of virtual IP by master pgpool node. You can</font></div><div><font face="arial, sans-serif">configure <span style="color:rgb(0,0,0)">wd_escalation_command and </span><span style="color:rgb(0,0,0)">wd_de_escalation_command</span> configuration parameters to provide the custom command or script.</font></div><div><font face="arial, sans-serif">Pgpool which executed <span style="color:rgb(0,0,0)">wd_escalation_command command </span>when it gets elected as a master and performs the escalation</font></div><div><font face="arial, sans-serif">and similarly when the it node will resign as a master the <span style="color:rgb(0,0,0)">wd_de_escalation_command command gets executed,</span></font></div></div></div></div></blockquote><div><br></div><div>1. I tried using the  above <span style="color:rgb(0,0,0);font-family:arial,sans-serif">wd_escalation_command</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"> and </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif">wd_</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif">de_</span><font color="#000000" face="arial, sans-serif">escalation_command. I have a 3 node cluster, Observed that the escalation command will be triggered if there are at least 2 nodes alive in the pgpool cluster.</font></div></div><div><font color="#000000" face="arial, sans-serif">If there is only master pgpool alive with no slave nodes, the command is never initiated. Is this behavior expected ?</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">2. Wanted to understand the significance of VIP, Is there any issue caused if I dont use the VIP in a 3-node pgpool cluster.</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">Please let me know.</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">Thanks And Regards,</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">   Lakshmi Y M</font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 16, 2019 at 2:17 AM Muhammad Usama &lt;<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 10, 2019 at 6:38 PM Lakshmi Raghavendra &lt;<a href="mailto:lakshmiym108@gmail.com" target="_blank">lakshmiym108@gmail.com</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"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>I am trying pgpool for automatic faliover on my postgresql cluster using the watchdog feature</div><div>Wanted to know a couple of things </div><div>1. Are there any hooks when pgpool re-elects next pgpool master ? wanted to run some customization during this time</div></div></div></blockquote><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Pgpool executes the user provided commands at the time of acquiring and releasing of virtual IP by master pgpool node. You can</font></div><div><font face="arial, sans-serif">configure <span style="color:rgb(0,0,0)">wd_escalation_command and </span><span style="color:rgb(0,0,0)">wd_de_escalation_command</span> configuration parameters to provide the custom command or script.</font></div><div><font face="arial, sans-serif">Pgpool which executed <span style="color:rgb(0,0,0)">wd_escalation_command command </span>when it gets elected as a master and performs the escalation</font></div><div><font face="arial, sans-serif">and similarly when the it node will resign as a master the <span style="color:rgb(0,0,0)">wd_de_escalation_command command gets executed,</span></font></div><div><font face="arial, sans-serif"><span style="color:rgb(0,0,0)"><br></span></font></div><div><a href="http://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#CONFIG-WATCHDOG-ESCALATION-DE-ESCALATION" target="_blank">http://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#CONFIG-WATCHDOG-ESCALATION-DE-ESCALATION</a></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"><div dir="ltr"><div dir="ltr"><div>2. Will the VIP get assigned ony if there are more than 1 node present in the pgpool cluster? I had 3 nodes where i had pgpool running. When the 1st and 2nd node&#39;s pgpool was shut i was expecting the 3rd node to acquire the VIP but it didn&#39;t happen. And if my understanding was right i was thinking of using the VIP in my database connection string (Since it will always be with pgpool master who can connect to my postgresql primary). Now if the 3rd node is not acquiring the VIP, i could not use it my connection string. Correct me if my understanding is wrong</div></div></div></blockquote><div><br></div><div>master pgpool only acquires the VIP when the quorum exists ( minimum 50% of nodes are reachable). This is done by Pgpool to guard against the split-brain syndrome, which could happen</div><div>otherwise in case of network partitioning. So if you have 3 Pgpool nodes configured than the VIP will only get assigned on master node when at-least 2 Pgpool nodes are alive and reachable.</div><div>but in case of 2 node configuration, only 1 node is required to ensure the quorum and in that case even if the single node is alive, it will get the VIP</div><div><br></div><div>Thanks</div><div>Best Regards </div><div>Muhammad Usama</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div><br></div><div>Thanks in advance</div><div><br></div><div>   Lakshmi Y M</div></div></div>
_______________________________________________<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>
</blockquote></div></div></div>
</blockquote></div></div>