<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:medium;"><div><div><br></div><div><pre>Thank you, it works like you said.</pre><pre>In pgpool.conf I have set </pre><pre>follow_master_command = ''</pre><pre>failover_command = ''</pre><pre>failback_command = ''</pre><pre>(streaming replication mode is enabled)</pre><pre>If a failover occurs then pgpool indeed detect the new master. The old master is detached so when it is restored as a slave one has to re-attach it with pcp_attach_node</pre></div><div>Thanks + Regards,</div><div><br></div><div>Pierre</div><div><br></div></div><div><br></div><div><br></div><div id="ydpf8dbfc0yahoo_quoted_6754139985" class="ydpf8dbfc0yahoo_quoted"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div>On Thursday, June 1, 2017, 6:22:13 PM GMT+2, Lazaro Garcia &lt;lazaro3487@gmail.com&gt; wrote:</div><div><br></div><div><br></div><div><div id="ydpf8dbfc0yiv8551831117"><div><div class="ydpf8dbfc0yiv8551831117WordSection1"><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span lang="EN-US" style="font-size:11.0pt;">When the master fails, repmgr promotes new master and then pgpool can detect the new master.</span></p><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span lang="EN-US" style="font-size:11.0pt;"> &nbsp;</span></p><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span lang="EN-US" style="font-size:11.0pt;">Regards.</span></p><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span lang="EN-US" style="font-size:11.0pt;"> &nbsp;</span></p><div class="ydpf8dbfc0yiv8551831117yqt7923159954" id="ydpf8dbfc0yiv8551831117yqt06470"><div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;"><p class="ydpf8dbfc0yiv8551831117MsoNormal"><b><span style="font-size:11.0pt;">De:</span></b><span style="font-size:11.0pt;"> Pierre Timmermans [mailto:ptim007@yahoo.com] <br clear="none"><b>Enviado el:</b> jueves, 1 de junio de 2017 11:49 a. m.<br clear="none"><b>Para:</b> Lazaro Garcia; 'Avi Weinberg'; pgpool-general@pgpool.net<br clear="none"><b>Asunto:</b> Re: [pgpool-general: 5550] Re: Server to never assume the role of master</span></p></div></div><p class="ydpf8dbfc0yiv8551831117MsoNormal"> &nbsp;</p><div><div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;">Avi,</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;">It is true that pgpool will not execute the follow master script on your slave if it is unknown of pgppol but on the other hand, in the failover script you can do what you want. In your case you could ssh to your permanent slave (which is not known to pgpool) and execute the postgres command to follow the new master.</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;">Lazara,</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;">Is it possible to use pgpool for load balancing and repmgrd for automatic failover ? I could not understand how to make this work. Is it enough to leave the pgpool configurations for failover script and follow_master script empty ? Is pgpool going to automatically detect that there is a new master and restart the child processes ?</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;">Pierre</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:13.5pt;"> &nbsp;</span></p></div><div id="ydpf8dbfc0yiv8551831117ydp185476a9yahoo_quoted_6688933274"><div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span lang="EN-US" style="font-size:10.0pt;">On Thursday, June 1, 2017, 3:29:50 PM GMT+2, Lazaro Garcia &lt;</span><span style="font-size:10.0pt;"><a shape="rect" href="mailto:lazaro3487@gmail.com" rel="nofollow" target="_blank"><span lang="EN-US">lazaro3487@gmail.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;">&gt; wrote:</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span lang="EN-US" style="font-size:10.0pt;"> &nbsp;</span></p></div><div><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span lang="EN-US" style="font-size:10.0pt;"> &nbsp;</span></p></div><div><div id="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849"><div><div><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">For that you can use repmgr for controlling the replica, promoting new master, and follow the slaves to new master and pgpool for load balancing, and HA of the cluster.</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">&nbsp;</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">Regards.</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">&nbsp;</span><span style="font-size:10.0pt;"></span></p><div id="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849yqt29025"><div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;"><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><b><span style="font-size:11.0pt;">De:</span></b><span style="font-size:11.0pt;"> <a shape="rect" href="mailto:pgpool-general-bounces@pgpool.net" rel="nofollow" target="_blank">pgpool-general-bounces@pgpool.net</a> [<a shape="rect" href="mailto:pgpool-general-bounces@pgpool.net" rel="nofollow" target="_blank">mailto:pgpool-general-bounces@pgpool.net</a>] <b>En nombre de </b>Avi Weinberg<br clear="none"><b>Enviado el:</b> jueves, 1 de junio de 2017 09:09 a. m.<br clear="none"><b>Para:</b> <a shape="rect" href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br clear="none"><b>Asunto:</b> [pgpool-general: 5548] Re: Server to never assume the role of master</span><span style="font-size:10.0pt;"></span></p></div></div><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span style="font-size:10.0pt;">&nbsp;</span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">Hi,</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">&nbsp;</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">Thanks for the quick reply!&nbsp; </span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">&nbsp;</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">I think it will not be that simple in my case since I want the "permanent slave" server to point to the new master when there is a failover.&nbsp; In case of a failover I want the "permanent slave" to be notified even if the other "non-permanent" slave is dead</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">I doubt it can achieved without pgpool knowing about the permanent slave? &nbsp;</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">&nbsp;</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">Thanks</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">Avi</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:11.0pt;">&nbsp;</span><span style="font-size:10.0pt;"></span></p><div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;"><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><b><span lang="EN-US" style="font-size:11.0pt;">From:</span></b><span lang="EN-US" style="font-size:11.0pt;"> PVY [<a shape="rect" href="mailto:balroga3@yandex.ru" rel="nofollow" target="_blank">mailto:balroga3@yandex.ru</a>] <br clear="none"><b>Sent:</b> Thursday, June 01, 2017 2:45 PM<br clear="none"><b>To:</b> Avi Weinberg &lt;<a shape="rect" href="mailto:AviW@gilat.com" rel="nofollow" target="_blank">AviW@gilat.com</a>&gt;<br clear="none"><b>Cc:</b> <a shape="rect" href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br clear="none"><b>Subject:</b> Re: [pgpool-general: 5546] Server to never assume the role of master</span><span style="font-size:10.0pt;"></span></p></div></div><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:10.0pt;">&nbsp;</span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal" style="margin-bottom:12.0pt;"><span lang="EN-US" style="font-size:10.0pt;">Hello, Avi.<br clear="none"><br clear="none">As far as I understand, if replication is configured on postgresql side, not via pgpool, then you can simply do not add this particular slave server to pgpool.conf.<br clear="none">In this case pgpool would not know about this slave and it will never promote it or send queries to it.</span><span style="font-size:10.0pt;"></span></p><table class="ydpf8dbfc0yiv8551831117MsoNormalTable" border="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1" width="2" style="width: 1.5pt; background-color: blue; padding: 0.75pt;"></td><td colspan="1" rowspan="1" style="padding:.75pt .75pt .75pt .75pt;"><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span style="font-size:11.0pt;">Hi all,<br clear="none"><br clear="none">I would like to have a master with two slaves setup. &nbsp;However, I want one of the servers to always be slave and never assume the role of master. &nbsp;Even more so, I would pgpool not to direct any queries to this "permanent slave" server.<br clear="none">How do I configure pgpool / postgres to achieve this<br clear="none"><br clear="none">Thanks<br clear="none">Avi<br clear="none"></span><span style="font-size:10.0pt;">IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person. </span></p></td></tr></tbody></table><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:10.0pt;"><br clear="none"><br clear="none"><br clear="none"><br clear="none"><i>-- <br clear="none">Best regards,<br clear="none">PVY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</i><a shape="rect" href="mailto:balroga3@yandex.ru" rel="nofollow" target="_blank">mailto:balroga3@yandex.ru</a></span><span style="font-size:10.0pt;"></span></p><p class="ydpf8dbfc0yiv8551831117ydp185476a9yiv0998764849msonormal"><span lang="EN-US" style="font-size:10.0pt;">IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person. </span><span style="font-size:10.0pt;"></span></p></div></div></div></div><div id="ydpf8dbfc0yiv8551831117ydp185476a9yqt33202"><p class="ydpf8dbfc0yiv8551831117MsoNormal"><span style="font-size:10.0pt;">_______________________________________________<br clear="none">pgpool-general mailing list<br clear="none"><a shape="rect" href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br clear="none"><a shape="rect" href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a></span></p></div></div></div></div></div></div></div></div></div></div></div></div></div></body></html>