[pgpool-hackers: 3884] Patch: Move auto_failback_interval in to BackendInfo, and update it any time the backend state is set to CON_DOWN

Nathan Ward lists+pgpool at daork.net
Mon Apr 26 18:47:03 JST 2021


Hi all,

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:
https://www.pgpool.net/pipermail/pgpool-general/2021-April/007564.html <https://www.pgpool.net/pipermail/pgpool-general/2021-April/007564.html>

I have attached 2 patches to resolve this issue. One patch is against V4_1_STABLE, and the other against master.

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.

The patches both do the following:
- 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.
- 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.
- Call the new function any time the backend status is set to CON_DOWN.
- Update documentation for auto_failback_interval configuration.

The changes in effect make pgpool wait $auto_failback_interval seconds after *either* an auto_failback event, or a CON_DOWN event.

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!).

--
Nathan Ward

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210426/2c7388eb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: auto_failback_fixes-master.patch
Type: application/applefile
Size: 92 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210426/2c7388eb/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210426/2c7388eb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: auto_failback_fixes-V4_1_STABLE.patch
Type: application/applefile
Size: 97 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210426/2c7388eb/attachment-0001.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210426/2c7388eb/attachment-0002.htm>


More information about the pgpool-hackers mailing list