<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">Thank you for your reply.</div><div class=""><br class=""></div><div class="">I was concerned about ignoring the pgpool_status file at startup. When pgpool starts, it check to see if the backend nodes are running, but does not communicate with the other pgpool server to check the state of the backends. It is possible for postgresql server to be running and still be in a detached state. I changed the failover and failback commands to include shutting down the postgresql-server on the backend that is being detached and attached. This seems to be working fine now and I think that I have my setup properly configured for all edge cases.</div><div class=""><br class=""></div><div class="">One thing that I noticed is that the result of the show pool_nodes command seems to be incorrect.</div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>psql -Upostgres -hcara0 -c "show pool_nodes”</font></div><div class=""><br class=""></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;node_id | hostname | port &nbsp;| status | lb_weight |&nbsp;role</font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>---------+----------+-------+--------+-----------+————</font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;0 &nbsp; &nbsp; &nbsp;&nbsp;| cara0 &nbsp; &nbsp;| 54321 | 2 &nbsp; &nbsp; &nbsp;| 0.500000 &nbsp;| master</font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;1 &nbsp; &nbsp; &nbsp;&nbsp;| cara1 &nbsp; &nbsp;| 54321 | 2 &nbsp; &nbsp; &nbsp;| 0.500000 &nbsp;| slave</font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>(2&nbsp;rows)&nbsp;</font><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>pcp_watchdog_info 10&nbsp;</font><span style="font-family: 'Courier New';" class="">cara0</span><font face="Courier New" class="">&nbsp;9898 postgres &lt;password&gt;&nbsp;<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>cara0 5432 9000 2<br class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>pcp_watchdog_info 10&nbsp;</font><span style="font-family: 'Courier New';" class="">cara0</span><font face="Courier New" class="">&nbsp;9898 postgres &lt;password&gt; 0<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>cara1 5432 9000 3</font></div><div class=""><br class=""></div><div class="">We can see that the server called cara1 is in fact the active node. I’m not concerned about this if it is just a reporting issue and is safe to ignore, but thought that I should ask.&nbsp;</div><div class=""><br class=""></div><div class=""><div class="">Cheers,<br class="">Gervais<br class=""></div><br class=""><blockquote type="cite" class="">On Mar 27, 2015, at 6:03 AM, Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp" class="">nagata@sraoss.co.jp</a>&gt; wrote:<br class=""><br class="">Hi Gervais,<br class=""><br class="">On Thu, 26 Mar 2015 11:39:40 -0300<br class="">Gervais de Montbrun &lt;<a href="mailto:gervais@silverorange.com" class="">gervais@silverorange.com</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class="">I have two servers running with replication, load balancing, watchdog (with virtual IP) enabled.<br class=""><br class="">My plan is to remove any single point of failure from my database. The web sites I am running would point to the virtual interface’s IP on whatever is running as a primary in the pgpool and there would be two database servers&nbsp;behind the pool. Here is my setup as it stands:<br class=""><br class="">dbserver0:<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>pgpool - get’s virtual IP if it starts first<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>postgres<br class=""><br class="">dbserver1:<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>pgpool<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>postgres&nbsp;<br class=""><br class="">I have everything working except that the there can be a situation where one of the pgpools starts up with a stale pgpool_staus file and it thinks a backend node is either up when it is down (or down when it is up). I am not sure&nbsp;how to sort this out as this file seems to only be written to when pgpool stops.<br class=""></blockquote><br class="">When pgpool starts up with -D option, an old pgpool_status is discarded<br class="">and pgpool recognizes the current status of backends.<br class="">If you want to modify backend status while pgpool is runing,<br class="">you can use pcp_attach_node or pcp_detach_node command.<br class=""><br class=""><blockquote type="cite" class=""><br class="">Can someone suggest how to sort this out. I know that you will likely need to review any number of config files and/or scripts in my configuration. Can you let me know what you would want to see before I sanitize them all and&nbsp;send them on.<br class=""><br class="">Also, if my plan is completely off, I am open to any alternative suggestion as to how to best achieve my goal as described above.<br class=""><br class="">Cheers,<br class="">Gervais<br class="">------------------------------------<br class="">Gervais de Montbrun<br class="">Systems Administrator<br class="">GTalk: <a href="mailto:gervais@silverorange.com" class="">gervais@silverorange.com</a><br class=""><br class=""></blockquote><br class=""><br class="">--&nbsp;<br class="">Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp" class="">nagata@sraoss.co.jp</a>&gt;<br class=""></blockquote><br class=""></div></body></html>