<html><head></head><body><div class="ydp3077d10ayahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>Answers to some questions (just my ideas )</div><div><br></div><div>1. failover_command : this will usually be a shell script. The script will do a standby promote on new master, so there is no reason that it would fail and I believe it is over-engineering to do more than that. But since this is a script, you are free to put what you want in it : if you want to check the result of the standby promote and if it fails try on the third node, it is possible.</div><div><br></div><div>2. pgpool does not support switch-over, you would have to stop the primary postgres database and let pgpool trigger the failover and then run a pcp_recovery on the old primary postgres</div><div><br></div><div>3. The VIP point to the pgpool master not to the postgres master. So application connects to pgpool, not to postgres.</div><div><br></div><div>4. No, pgpool will not do anything when a failed standby comes back, this must be done manually or you could develop a script and schedule it via cron for example (it is a bit complex and it might be risky)</div><div><br></div><div>5. No idea, sorry</div><div><br></div><div class="ydp3077d10asignature">Pierre</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydp8ace897yahoo_quoted_8831462116" class="ydp8ace897yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Wednesday, May 22, 2019, 8:08:49 PM GMT+2, Lakshmi Raghavendra &lt;lakshmiym108@gmail.com&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp8ace897yiv4418830932"><div dir="ltr">Hi,<div><br></div><div>&nbsp; &nbsp;It would be of a great help if someone helps me out with the below queries, as am planning to use it in our production environment. Replies&nbsp;@ the earliest would be highly appreciated.&nbsp;</div><div><br></div><div>1. In case of failure on the master postgres, "failover_command" is being executed.</div><div>However, In a 3 node cluster, when the master (node-0) goes down failover_command is run against the node-1 (auto selection by pgpool). But if this fails, there is no primary elected and also the following follow_master_command is also not run.</div><div>Is there any way, we could configure the failover_command to run on node -2 , if it wasn't successful on node-1 ?</div><div><br></div><div>2.&nbsp; Failover_command / follow_master_command is run only in case of primary postgres failure. For some reason if a end-user wanted to switch his primary postgres node from node-0 to node-1 in a 3-node pgpool cluster (without any failures on node-0 ),</div><div>Does pgpool support any command which will internally do a combination of failover_command( to make new node-1 as primary postgres )+ follow_master_command on the intended slaves ?</div><div><br></div><div>3. As per my understanding, VIP helps us to&nbsp; always point to the primary postgres. Thus any application which is accessing postgres&nbsp; via VIP will always be highly available. In my application due to some unknown reason, when VIP is configured, the application's APIs stops working. Hence as a workaround, I have chosen to maintain /etc/hosts entries of the primary postgres on all my nodes and recover.conf / any one who would want to access the master, would basically access with the name present here. Please let me know if this serves the purpose or am I missing something here.</div><div><br></div><div>4. When the postgres on master / slave comes up after a failure , is there any script which could be run by pgpool to get it in sync with the new master ?</div><div>I referred the documentation :&nbsp;<a href="http://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html" rel="nofollow" target="_blank">http://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html</a>&nbsp;,which says when a postgres node gets attached to pgpool failback_command will be executed, but I never see the command being triggered by&nbsp; pgpool when the postgres server is back and running.</div><div>Kindly let me know how I can achieve this</div><div><br></div><div><br></div><div>5. In the pgpool logs, I see a line as below :</div><div><br></div><div>&nbsp;2019-05-08T06:17:35+00:00&nbsp; r connection request[14251]: [403-1] 2019-05-08 06:17:35: pid 14251: LOG: &nbsp;failback event detected<br>2019-05-08T06:17:35+00:00 r connection request[14251]: [403-2] 2019-05-08 06:17:35: pid 14251: DETAIL: &nbsp;restarting myself<br></div><div><br></div><div>Is it usual to see this in the log ?</div><div><br></div><div><br></div><div>Please let&nbsp; me know.</div><div><br></div><div>Thanks in Advance !</div><div><br></div><div>&nbsp;</div></div></div>_______________________________________________<br>pgpool-general mailing list<br><a href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br><a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br></div>
            </div>
        </div></body></html>