<div dir="ltr"><div dir="ltr"><div>Thnx for reply. I have some questions.</div><div><br></div><div>Question #1: failover script when stand-by fail. </div><div><br></div><div>In pgpool.conf there is parameter</div><div>failover_command = '' # Executes this command at failover</div><div>But there is no indication what exactly fail means - fail of master-server or fail of stand-by server?</div><div>You wrote "When the standby is stopped, pgpool tries to reconnect x times ... then it does the failover script..." Where in pgpool.conf you defined this script?</div><div><br></div><div>Question #2: you wrote "... it detaches the standby".</div><div>I did exactly the same setting as you wrote, but pgpool stil showing stand-by as "up" meanwhile it is "down".</div><div>Mayby there is some parameter which exactly tells that stand-by MUST be detached when it fails?</div><div><br></div><div>Question #3: you wrote "I  also put the parameter failover_on_backend_error = 'off' "</div><div>Why? If "off" than when master fail occurs - no stand-by promotes. Or I wrong?</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вт, 26 мар. 2019 г. в 23:16, Pierre Timmermans <<a href="mailto:ptim007@yahoo.com">ptim007@yahoo.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-4566473624470018067ydp27056c46yahoo-style-wrap" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px"><div id="gmail-m_-4566473624470018067ydp27056c46yiv6910111429"><div><div class="gmail-m_-4566473624470018067ydp27056c46yiv6910111429ydpd6be4b0fyahoo-style-wrap" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px"><div><div>Hi Dimitri</div><div><br></div><div>Did you set-up the health checks ?</div><div><br clear="none"></div><div>In my pgpool config I have the following parameters related to the health checks</div><div><span></span><pre class="gmail-m_-4566473624470018067ydp27056c46yiv6910111429ydp801fcaaehighlight"><code>health_check_period = 10
health_check_timeout = 10
health_check_user = 'hcuser'
health_check_password = 'hcuser'
health_check_database = 'postgres'
health_check_max_retries = 5
health_check_retry_delay = 1</code></pre><code>I </code> also put the parameter <span><span></span></span><pre class="gmail-m_-4566473624470018067ydp27056c46yiv6910111429ydp801fcaaehighlight"><code>failover_on_backend_error = 'off' </code></pre><div>And I created the user hcuser on the postgres database</div><div><br clear="none"></div><div>When the standby is stopped, pgpool tries to reconnect x times (depending on health_check_max_retries parameter) then it does the failover script (the script does not have to do something because it is not the primary failing) and it detaches the standby. When the standby is started again, pgpool does a failback script (I do nothing in this script) and then it attaches the standby again</div></div><div><br></div><div>I believe that if you don't set-up the health-checks pgpool does not detach the standby when it fails (not sure if it is as-designed or not)</div><div><br></div><div class="gmail-m_-4566473624470018067ydp27056c46yiv6910111429ydpd6be4b0fsignature">Pierre</div></div>
        <div><br clear="none"></div><div><br clear="none"></div>
        
        </div><div class="gmail-m_-4566473624470018067ydp27056c46yiv6910111429ydp91a4f78ayahoo_quoted" id="gmail-m_-4566473624470018067ydp27056c46yiv6910111429ydp91a4f78ayahoo_quoted_4530071327">
            <div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                
            </div>
        </div></div></div></div><div class="gmail-m_-4566473624470018067ydp173286f0yiv6910111429yqt0960235458" id="gmail-m_-4566473624470018067ydp173286f0yiv6910111429yqt13711"><div>
                    On Tuesday, March 26, 2019, 3:58:52 PM GMT+1, Dmitry Medvedev <<a href="mailto:dm.dm.medvedev@gmail.com" target="_blank">dm.dm.medvedev@gmail.com</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="gmail-m_-4566473624470018067ydp173286f0yiv6910111429ydp91a4f78ayiv3818813086"><div dir="ltr"><div>Hello to everyone.</div><div><br clear="none"></div><div>A couple of days I've spent trying to understand how pgpool-II works.</div><div>Tell me, please, principle of operation when slave node goes down.</div><div>I've read tons of manuals and when master node in my test cluster goes down (or master's network interface goes down) - pgpool does failover actions. Everything is OK and works as expected.</div><div>But when slave node goes down - pgpool does nothing at all and I receive such answer</div><div><br clear="none"></div><div>test=# show pool_nodes;</div><div> node_id |  hostname   | port | status | lb_weight |  role  | select_cnt | load_balance_node | replication_delay | last_status_change</div><div>---------+-------------+------+--------+-----------+--------+------------+-------------------+-------------------+---------------------</div><div> 0       | 172.28.30.6 | 5434 | up     | 0.500000  | master | 3          | true              | 0                 | 2019-03-26 17:04:12</div><div> 1       | 172.28.30.7 | 5434 | up     | 0.500000  | slave  | 0          | false             | 0                 | 2019-03-26 17:04:12</div><div>(2 rows)</div><div><br clear="none"></div><div><br clear="none"></div><div>At the same time slave node is completely down. Not "up"! select * from pg_stat_replication showing (0 rows)</div><div><br clear="none"></div><div>Why does pgpool-II does nothing when slave node goes down and how I can change it?</div></div></div>_______________________________________________<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><br clear="none"></div></div></div></blockquote></div>