<div dir="ltr">Hi,<div><br></div><div>we are using load_balance_mode = on, yet, in some of our setups the pgpool_nodes is showing the select_cnt is very unbalanced.</div><div><div><br></div><div>an example from one of the setups:</div><div><br></div><div> node_id |   hostname    | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay</div><div>---------+---------------+------+--------+-----------+---------+------------+-------------------+-------------------</div><div> 0       | 172.18.255.41 | 5432 | up     | 0.500000  | primary | 8235100    | false             | 0</div><div> 1       | 172.18.255.42 | 5432 | up     | 0.500000  | standby | 0          | true              | 0</div></div><div><br></div><div><div><u>pgstat output:</u></div><div>Node: 0</div><div>Host: 172.18.255.41</div><div>Port: 5432</div><div>Weight: 0.500000</div><div>Status: Up, in pool and connected (2)</div><div>Role: Master</div><div><br></div><div>Node: 1</div><div>Host: 172.18.255.42</div><div>Port: 5432</div><div>Weight: 0.500000</div><div>Status: Up, in pool and connected (2)</div><div>Role: Slave</div><div>Replication lag: 0 bytes</div></div><div><br></div><div><u>Configuration</u>:</div><div><div>#------------------------------------------------------------------------------</div><div># LOAD BALANCING MODE</div><div>#------------------------------------------------------------------------------</div><div><br></div><div>load_balance_mode = on</div><div>                                   # Activate load balancing mode</div><div>                                   # (change requires restart)</div><div>ignore_leading_white_space = on</div><div>                                   # Ignore leading white spaces of each query</div><div>white_function_list = &#39;get_oid_values&#39;</div><div>                                   # Comma separated list of function names</div><div>                                   # that don&#39;t write to database</div><div>                                   # Regexp are accepted</div><div>black_function_list = &#39;&#39;</div><div>                                   # Comma separated list of function names</div><div>                                   # that write to database</div><div>                                   # Regexp are accepted</div><div><br></div><div>database_redirect_preference_list = &#39;&#39;</div><div>                                                                   # comma separated list of pairs of database and node id.</div><div>                                                                   # example: postgres:primary,mydb[0-4]:1,mydb[5-9]:2&#39;</div><div>                                                                   # valid for streaming replicaton mode only.</div><div><br></div><div>app_name_redirect_preference_list = &#39;&#39;</div><div>                                                                   # comma separated list of pairs of app name and node id.</div><div>                                                                   # example: &#39;psql:primary,myapp[0-4]:1,myapp[5-9]:standby&#39;</div><div>                                                                   # valid for streaming replicaton mode only.</div><div>allow_sql_comments = off</div><div>                                                                   # if on, ignore SQL comments when judging if load balance or</div><div>                                                                   # query cache is possible.</div><div>                                                                   # If off, SQL comments effectively prevent the judgment</div><div>                                                                   # (pre 3.4 behavior).</div></div><div><br></div><div><div># - Streaming -</div><div><br></div><div>sr_check_period = 10</div><div>                                   # Streaming replication check period</div><div>                                   # Disabled (0) by default</div><div>....</div><div>delay_threshold = 200000</div><div>                                   # Threshold before not dispatching query to standby node</div><div>                                   # Unit is in bytes</div><div>                                   # Disabled (0) by default</div></div><div><br></div><div><br></div><div><br></div><div>we have tries reloading with &quot;allow_sql_comments = on&quot; and &quot;delay_threshold = 0&quot;</div><div><br></div><div>what could it be?</div><div><br></div><div>Thanks in advance,</div><div>Rolan.</div></div>