<div dir="ltr"><div class="gmail_quote"><br><br><div dir="ltr"><div>Hello,</div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">I&#39;m using postgres 9.4.9, pgpool 3.5.4 on centos 6.8.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">I&#39;m having a major hard time getting pgpool to automatically detect when nodes are up (it often detects the first node but rarely detects the secondary) but if I use pcp_attach_node to tell it what nodes are up, then everything is hunky dory.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">So I figured until I could properly sort the issue out, I would write a little script to check the status of the nodes and attach them as appropriate, but I&#39;m having trouble with the password prompt. According to the documentation, I should be able to issue commands like</p><pre class="m_1230949643366586183gmail-lang-sql m_1230949643366586183gmail-prettyprint m_1230949643366586183gmail-prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,&quot;lucida console&quot;,&quot;liberation mono&quot;,&quot;dejavu sans mono&quot;,&quot;bitstream vera sans mono&quot;,&quot;courier new&quot;,monospace,sans-serif;background-color:rgb(239,240,241);color:rgb(57,51,24);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,&quot;lucida console&quot;,&quot;liberation mono&quot;,&quot;dejavu sans mono&quot;,&quot;bitstream vera sans mono&quot;,&quot;courier new&quot;,monospace,sans-serif;white-space:inherit"><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">pcp_attach_node </span><span class="m_1230949643366586183gmail-lit" style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">10</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> localhost </span><span class="m_1230949643366586183gmail-lit" style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">9898</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> pgpool mypass </span><span class="m_1230949643366586183gmail-lit" style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">1</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">but that just complains</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">pcp_attach_node: Warning: extra command-line argument &quot;localhost&quot; ignored pcp_attach_node: Warning: extra command-line argument &quot;9898&quot; ignored pcp_attach_node: Warning: extra command-line argument &quot;pgpool&quot; ignored pcp_attach_node: Warning: extra command-line argument &quot;mypass&quot; ignored pcp_attach_node: Warning: extra command-line argument &quot;1&quot; ignored</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">it&#39;ll only work when I use parameters like</p><pre class="m_1230949643366586183gmail-lang-sql m_1230949643366586183gmail-prettyprint m_1230949643366586183gmail-prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,&quot;lucida console&quot;,&quot;liberation mono&quot;,&quot;dejavu sans mono&quot;,&quot;bitstream vera sans mono&quot;,&quot;courier new&quot;,monospace,sans-serif;background-color:rgb(239,240,241);color:rgb(57,51,24);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,&quot;lucida console&quot;,&quot;liberation mono&quot;,&quot;dejavu sans mono&quot;,&quot;bitstream vera sans mono&quot;,&quot;courier new&quot;,monospace,sans-serif;white-space:inherit"><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">pcp_attach_node </span><span class="m_1230949643366586183gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">U pgpool </span><span class="m_1230949643366586183gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">h localhost </span><span class="m_1230949643366586183gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">p </span><span class="m_1230949643366586183gmail-lit" style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">9898</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span class="m_1230949643366586183gmail-pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">n </span><span class="m_1230949643366586183gmail-lit" style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">1</span><span class="m_1230949643366586183gmail-pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">and there&#39;s no parameter for the password, I have to manually enter it at the prompt.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,&quot;helvetica neue&quot;,helvetica,sans-serif">Any suggestions for sorting this other than using Expect?</p></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_1230949643366586183gmail_signature">This is not a signature<br><br></div>
</font></span></div>
</div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">This is not a signature<br><br></div>
</div>