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

KAWAMOTO Masaya kawamoto at sraoss.co.jp
Tue Apr 20 17:24:35 JST 2021


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 ¡÷ sraoss.co.jp>
SRA OSS, Inc. Japan
-------------- next part --------------
¥Æ¥­¥¹¥È·Á¼°°Ê³°¤ÎźÉÕ¥Õ¥¡¥¤¥ë¤òÊݴɤ·¤Þ¤·¤¿...
¥Õ¥¡¥¤¥ë̾: select_lower_delay_load_balance_node.patch
·¿:         application/octet-stream
¥µ¥¤¥º:     5641 ¥Ð¥¤¥È
ÀâÌÀ:       ̵¤·
URL:        <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210420/93046581/attachment.obj>


More information about the pgpool-hackers mailing list