<div dir="ltr">Hello,<div><br></div><div>This method works well, but doesn&#39;t really play nicely with our use of Puppet (which manages the config files).</div><div><br></div><div>Would anyone support looking into a pcp command to change this? I may have some time early in the new year to have a go at an implementation.</div><div><br></div><div>I was thinking a very simple:</div><div><br></div><div>pcp_node_weight timeout hostname port# username password nodeID newweight</div><div><br></div><div>Maybe there is a reason this won&#39;t work / isn&#39;t a good idea though?</div><div><br></div><div>Cheers,</div><div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div style="color:#b8276a;font:bold 14px Arial,Helvetica,sans-serif">
        <br>
        <span style="color:#323b62">James Sewell,</span><br>
        <span style="color:#a9a9a9"><span style="font:12px Arial,Helvetica,sans-serif">PostgreSQL Team Lead / Solutions Architect </span></span><br>
        <span style="color:#a9a9a9">______________________________________</span><br>
         </div>
<img alt="" src="http://www.lisasoft.com/sites/lisasoft/files/u1/logo1.jpg" style="margin:0px;width:153px;height:50px"><br>
<div style="font:normal 12px/20px Arial,Helvetica,sans-serif;color:#404040;margin:0">
        <span style="color:#a9a9a9">Level 2, 50 Queen St, Melbourne VIC 3000</span><br>
        <br>
        <strong>P </strong><span style="color:#a9a9a9"><span style="font-family:Arial,Verdana,sans-serif">(+61) 3 8370 8000</span></span><span style="color:rgb(169,169,169)"> </span><strong> </strong><span style="color:rgb(50,59,98)"><span style="width:15px;display:inline-block"><strong>W</strong></span></span> <a style="color:rgb(64,64,64);margin:2px 0px;text-decoration:none"><span style="color:#a9a9a9">www.lisasoft.com</span></a>  <span style="color:rgb(50,59,98)"><span style="width:15px;display:inline-block"><strong>F </strong></span></span><span style="color:#a9a9a9"><span style="font-family:Arial,Verdana,sans-serif">(+61) 3 8370 8099</span></span></div>
<div style="padding-top:8px">
         </div></div></div>
<br><div class="gmail_quote">On Tue, Jul 15, 2014 at 5:38 PM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; Hey All,<br>
&gt;<br>
&gt; I have two nodes setup like so:<br>
&gt;<br>
</span>&gt;    - Node 1: Master, weight 0<br>
&gt;    - Node 2: Slave, weight 1<br>
<span class="">&gt;<br>
&gt; This allows me to send all writes to the master and all reads to the slave.<br>
&gt;<br>
&gt; At some stage I promote the slave to be the new master (pcp_promote with<br>
&gt; DISALLOW_TO_FAILOVER), then at some stage later re-provision the master as<br>
&gt; a new slave and re-connect it (pcp_enable)<br>
&gt;<br>
&gt; I now have the following setup:<br>
&gt;<br>
</span>&gt;    - Node 1: Slave, weight 0<br>
&gt;    - Node 2: Master, weight 1<br>
<span class="">&gt;<br>
&gt; This means that all write and read queries are serviced by the new master,<br>
&gt; and none by the new slave.<br>
&gt;<br>
&gt; Is there a way around this? If there isn&#39;t currently could a pcp command be<br>
&gt; implemented which would allow me to manage my own weights?<br>
<br>
</span>You could change weight parameters in pgpool.conf then reload it.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<span class=""><br>
&gt; Cheers,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; James Sewell,<br>
&gt; PostgreSQL Team Lead / Solutions Architect<br>
&gt; ______________________________________<br>
&gt;<br>
&gt;<br>
</span><span class="">&gt;  Level 2, 50 Queen St, Melbourne VIC 3000<br>
&gt;<br>
</span>&gt; *P *<a href="tel:%28%2B61%29%203%208370%208000" value="+61383708000">(+61) 3 8370 8000</a>  *W* <a href="http://www.lisasoft.com" target="_blank">www.lisasoft.com</a>  *F *<a href="tel:%28%2B61%29%203%208370%208099" value="+61383708099">(+61) 3 8370 8099</a><br>
<span class="HOEnZb"><font color="#888888">&gt;<br>
&gt; --<br>
&gt;<br>
&gt;<br>
&gt; ------------------------------<br>
&gt; The contents of this email are confidential and may be subject to legal or<br>
&gt; professional privilege and copyright. No representation is made that this<br>
&gt; email is free of viruses or other defects. If you have received this<br>
&gt; communication in error, you may not copy or distribute any part of it or<br>
&gt; otherwise disclose its contents to anyone. Please advise the sender of your<br>
&gt; incorrect receipt of this correspondence.<br>
</font></span></blockquote></div><br></div>

<br>
<p><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14.545454025268555px;background-color:rgb(255,255,255)"><hr><font size="1" color="Gray" face="Arial">The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.</font></div></p>