<div dir="ltr">Hi,<div>Thanks for your replay...</div><div>I do use online recovery in case a full recovery is needed (using pg_basebackup - via pcp_recovery_node). </div><div>but I added an ability to perform a switchover between the nodes using stop/detach primary - failover occurs and reattach it as secondary (using failback script).</div><div>but as the failback finished the pgpool does not attach it as secondary!!</div><div><br></div><div><br></div><div>Can you please advice?</div><div><br></div><div>cohavisi</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 1, 2016 at 10:41 AM, 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">You should use online recovery instead of pcp_attach_node.<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" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
<span class=""><br>
&gt; Hi,<br>
&gt; I have a Hugh problem regarding attaching a node (as secondary) to the pool<br>
&gt; after I performing pcp_attach_node.<br>
&gt;<br>
&gt; after failover is being completed successfully and valid primary node is<br>
</span>&gt; active, i&#39;m performing an *pcp_attach (via sql)* to the faulty node in<br>
<span class="">&gt; order to failback as secondary!<br>
&gt;<br>
</span>&gt; *select pcp_attach_node (0,&#39;10.10.61.99&#39;,1200,9898,&#39;*****&#39;,&#39;*****&#39;) *<br>
<span class="">&gt;<br>
&gt; during this command, a failback script is being executed and performs the<br>
&gt; following:<br>
&gt; 1. rsync between the DB nodes.<br>
&gt; 2. create recovery.conf.<br>
&gt; 3. startup the node(as secondary).<br>
&gt;<br>
</span>&gt; *the failback could take for 20 min to finish.*<br>
&gt;<br>
&gt; after the failback finished *successfully* (exit status 0) and the node<br>
&gt; started as *secondary* (according to postgres) - streaming replication.<br>
&gt;<br>
&gt; *the pgpool reportes the node status from 1 to 3 (instead of 2).*<br>
&gt;<br>
&gt; *** when failback finished early (less then few min) the pgpool reports the<br>
&gt; node status as 2 - as aspected.*<br>
<span class="">&gt;<br>
&gt;<br>
&gt; please advice regarding this issue...<br>
&gt;<br>
&gt;<br>
</span>&gt; *Thanks,*<br>
&gt; *cohavisi*<br>
</blockquote></div><br></div>