<div dir="ltr">Actually this was wrong.<div><br></div><div>I am doing as above, but with ALLOW_TO_FAILOVER.</div><div><br></div><div>If I do it with DISALLOW_TO_FAILOVER then I can&#39;t use use commands such as pcp_promote and pcp_detach for cluster fencing.</div>
<div><br></div><div>Does this make sense?</div><div><br></div><div>Cheers,</div></div><div class="gmail_extra"><br clear="all"><div><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>
<br><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 5:23 PM, Yugo Nagata <span dir="ltr">&lt;<a href="mailto:nagata@sraoss.co.jp" target="_blank">nagata@sraoss.co.jp</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Thanks for yor information!<br>
<br>
Ok, pcp_promote_node is used with other cluster software and<br>
DISALLOW_TO_FAILOVER. Failover is not managed by pgpool-II<br>
but pcp_promote_node is used for fencing the old master,<br>
since this can detach nodes even when DISALLOW_TO_FAILOVER is used.<br>
<br>
In this case, is follow_master command used or not and how if used?<br>
<div class=""><br>
On Mon, 7 Jul 2014 16:45:06 +1000<br>
James Sewell &lt;<a href="mailto:james.sewell@lisasoft.com">james.sewell@lisasoft.com</a>&gt; wrote:<br>
<br>
&gt; Hello,<br>
&gt;<br>
&gt; I have some clients who are currently using pcp_promote_node with<br>
&gt; DISALLOW_TO_FAILOVER.<br>
&gt;<br>
&gt; They have a two node PostgreSQL cluster which is managed by EnterpriseDB&#39;s<br>
&gt; PPFM (Postgres Plus Failover Manager). This is a requirement.<br>
&gt;<br>
&gt; When a failover happens and PPFM promotes the new slave it fences the old<br>
&gt; master with the pcp_promote_node command.<br>
&gt;<br>
&gt; This is desirable because<br>
&gt;<br>
</div>&gt;    1. It detaches the old master<br>
&gt;    2. It promotes the promotion target to master<br>
&gt;    3. It does not block while searching for the new master (as would occur<br>
<div class="">&gt;    with pcp_detach_node)<br>
&gt;<br>
&gt; After pcp_promote_node is called, the PostgreSQL failover occurs. This does<br>
&gt; mean a short period in which the pgpool master is not promoted, but this<br>
&gt; seems to be tolerated by the software.<br>
&gt;<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>
</div><div class="">&gt;  Level 2, 50 Queen St, Melbourne VIC 3000<br>
&gt;<br>
</div>&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>

<div class="HOEnZb"><div class="h5">&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Jun 26, 2014 at 4:54 PM, Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi all,<br>
&gt; &gt;<br>
&gt; &gt; Are you using pcp_promote_node? If so, please tell me your usecase!<br>
&gt; &gt;<br>
&gt; &gt; pgpool-II has pcp_promote_node command, which change specified backend<br>
&gt; &gt; nodes status to &#39;primary&#39;, but this has some problems.<br>
&gt; &gt; So, if there is no users of pcp_promote_node, we consider to remove<br>
&gt; &gt; this from pgpool-II. Or not, I want to know usecases and fix<br>
&gt; &gt; pcp_promote_node to be more usefull and suitable for the usecase.<br>
&gt; &gt;<br>
&gt; &gt; The current pcp_promote_node works as below;<br>
&gt; &gt;<br>
&gt; &gt; (0) This is enabled only in master-slave / streaming-replication mode.<br>
&gt; &gt;<br>
&gt; &gt; (1) This changes pgpool-II&#39;s internal status and set the specified<br>
&gt; &gt;     node to primary. The internal status is used in online-recovery<br>
&gt; &gt;     and loadbalancing etc..<br>
&gt; &gt; ** Note that this doesn&#39;t control the backend nodes themselves.**<br>
&gt; &gt;<br>
&gt; &gt; (2) All nodes other than the new primary are detached from pgpool-II.<br>
&gt; &gt;<br>
&gt; &gt; (3) pgpool-II execute follow_master command for all the detached nodes.<br>
&gt; &gt;     follow_master command is mainly used for auto-recovery of standbys<br>
&gt; &gt;     from the new primary.<br>
&gt; &gt;<br>
&gt; &gt; Here, I found the some problems:<br>
&gt; &gt;<br>
&gt; &gt; (a) Even when DISALLOW_TO_FAILOVER is used, backends node are detached<br>
&gt; &gt;     at step (2).<br>
&gt; &gt; (b) If pcp_recovery_node is executed in follow_master command at step (3),<br>
&gt; &gt;     recovery can fail because pgpool-II&#39;s internal status can be different<br>
&gt; &gt;     from the acutual backend status of primary/standby.<br>
&gt; &gt;<br>
&gt; &gt; I want to fix about (a), if there is any user of pcp_promote_node.<br>
&gt; &gt; I think the design would be:<br>
&gt; &gt;  - When DISALLOW_TO_FAILOVER is used, pcp_promote_node is disabled<br>
&gt; &gt;    because this command can detach some backend nodes.<br>
&gt; &gt;  - or, pcp_promote_node change primary node status, but doesn&#39;t detach<br>
&gt; &gt;    any nodes. (In this case, some trick would be required so that<br>
&gt; &gt;    primary node should be unique.)<br>
&gt; &gt;<br>
&gt; &gt; About (b), I think this is a restriction of pgpool-II. User have<br>
&gt; &gt; to note that internal status can be different from the acutual backend<br>
&gt; &gt; status of primary/standby, after using pcp_promote_node. If you know<br>
&gt; &gt; other idea, please tell me.<br>
&gt; &gt;<br>
&gt; &gt; Any comment and suggestion?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Best regards,<br>
&gt; &gt; --<br>
&gt; &gt; Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; pgpool-general mailing list<br>
&gt; &gt; <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
&gt; &gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
&gt; &gt;<br>
&gt;<br>
</div></div><span class="HOEnZb"><font color="#888888">&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>
<br>
<br>
--<br>
Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt;<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>