[pgpool-hackers: 3887] Re: 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
Tue Apr 27 06:16:35 JST 2021


Hi,

Sorry about that! I dragged them from the vscode file list directly to Mail - I suspect that that doesn’t work when using remote editing..!

I have attached the files now - does that work?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: auto_failback_fixes-V4_1_STABLE.patch
Type: application/octet-stream
Size: 5909 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210427/ffefe482/attachment.obj>
-------------- next part --------------
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: auto_failback_fixes-master.patch
Type: application/octet-stream
Size: 5938 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210427/ffefe482/attachment-0001.obj>
-------------- next part --------------


> On 26/04/2021, at 11:16 PM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
> 
> Sorry but I failed to find attached patches. (It seems their content
> types are "Application/Applefile").
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> 
>> 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
>> 



More information about the pgpool-hackers mailing list