<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">In a thread on the pgpool-general list, I mentioned an issue where auto_failback causes follow_master_command to not be run during a primary failover in some situations. The thread is here:</div><div class=""><a href="https://www.pgpool.net/pipermail/pgpool-general/2021-April/007564.html" class="">https://www.pgpool.net/pipermail/pgpool-general/2021-April/007564.html</a></div><div class=""><br class=""></div><div class="">I have attached 2 patches to resolve this issue. One patch is against V4_1_STABLE, and the other against master.</div><div class=""><br class=""></div><div class="">I have tested the V4_1_STABLE version, but have not tested this against master (or 4.2) - as I don’t have 4.2/master configs, scripts, etc. ready to go - however I have reviewed the differences and believe that against 4.2 and master the changes will work just the same as against 4.1.</div><div class=""><br class=""></div><div class="">The patches both do the following:</div><div class="">- Move the auto_failback_interval status variable to the BackendInfo structure, and rename it to auto_failback_time to more accurately reflect the purpose of the variable.</div><div class="">- Define a new function (pool_set_backend_status_changed_time) which updates auto_failback_time for a specific backend to be now + configured auto_failback_interval.</div><div class="">- Call the new function any time the backend status is set to CON_DOWN.</div><div class="">- Update documentation for auto_failback_interval configuration.</div><div class=""><br class=""></div><div class="">The changes in effect make pgpool wait $auto_failback_interval seconds after *either* an auto_failback event, or a CON_DOWN event.</div><div class=""><br class=""></div><div class="">I am hoping that should this be accepted, it is applied against V4_1_STABLE for inclusion in 4.1.7 (as that’s what I’m running!).</div><div class=""><br class=""></div><div class="">--</div><div class="">Nathan Ward</div><div class=""><br class=""></div><div class=""></div></body></html>