[pgpool-hackers: 3881] Re: Proposal: If replication delay exceeds delay_threshold, elect a new load balance node with less delay

Bo Peng pengbo at sraoss.co.jp
Wed Apr 21 09:30:15 JST 2021


Hi,

Thank you for your patch.
I am going to review your patch and give you feedback.

On Tue, 20 Apr 2021 17:24:35 +0900
KAWAMOTO Masaya <kawamoto at sraoss.co.jp> wrote:

> Hi hackers.
> 
> On streaming replication mode, pgpool check the streaming delay on selected load
> balance node if delay_threshold paraeter is larger than 0. When the delay exceeds
> delay_theshold, pgpool send the query to primary regardless other standbies not
> delayed. I want the user to be able to choose whether pgpool always send to primary
> when there are other standbys with less delay by adding a boolean parameter
> "prefer_lower_delay_standby" to pgpool.conf.
> 
> I improve select_load_balancing_node() function.
> If "prefer_lower_delay" is true, pgpool selects another standby node that is lower delayed
> than the suggested node even if the suggested node name matches
> database_redirect_preference_list or app_redirect_preference_list.
> 
> Best Regards.
> 
> -- 
> KAWAMOTO Masaya <kawamoto at sraoss.co.jp>
> SRA OSS, Inc. Japan


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan


More information about the pgpool-hackers mailing list