<div dir="ltr">
<div>Hi</div><div><br></div><div>I just upgraded to 4.4.1 and am 
noticing that "delay_threshold_by_time" does not seem to be logging or 
even showing replication lag.</div><div><br></div><div>I use pgbench with scale_factor=1000 to cause replication delay during the initialization phase.</div><div>During this phase (which lasts about a minute) I am able to <br></div><div>SELECT * FROM pg_stat_replication <br></div><div>and see replication lag being 15-20 seconds for duration of initialization</div><div><br></div><div>However, pgpool log does not show and thresholds reached in the log (despite having 
log_standby_delay = 'always'

) and "pcp_node_info" and "show pool_nodes" show no lag either<br></div><div><br></div><div>if I switch back to "delay_threshold" param only, everything is working as expected and I can see log entries such as:<br><br>sr_check_worker CONTEXT:  while checking replication time lag<br>sr_check_worker LOG:  Replication of node: 1 is behind 820903040 bytes from the primary server (node: 0)<br></div><div><br></div><div>But none of this works when I put "delay_threshold_by_time=1"......</div><div><br></div><div>1. Is this a valid bug or could it be my settings?<br></div><div>2.
 If in fact this is a bug, is it just affecting logging/displaying or 
the lag and the switching of SELECT queries to primary would still occur
 if I use this setting and the lag threshold is reached?<br></div><div><br><br><br></div><div>Below if my config (just a diff of settings I changed from default pgpool.conf.sample)<br>[/etc/pgpool-II]<br>[root@localhost]# pgpool --version<br>pgpool-II version 4.4.1 (nurikoboshi)<br><br>[/etc/pgpool-II]<br>[root@localhost]# diff --unchanged-line-format= --old-line-format= --new-line-format='%L' pgpool.conf.sample pgpool.conf<br>listen_addresses = '*'<br>serialize_accept = on<br>backend_hostname0 = '10.11.32.15'<br>backend_port0 = 5432<br>backend_weight0 = 1<br>backend_data_directory0 = '/data/pgdata/15'<br>backend_flag0 = 'ALWAYS_PRIMARY'<br>backend_application_name0 = 'pg-1'<br>backend_hostname1 = '10.11.96.15'<br>backend_port1 = 5432<br>backend_weight1 = 1<br>backend_data_directory1 = '/data/pgdata/15'<br>backend_flag1 = 'DISALLOW_TO_FAILOVER'<br>backend_application_name1 = 'pg-2'<br>num_init_children = 246<br>max_pool = 2<br>child_life_time = 0<br>log_line_prefix = '%m [%p]: [%l-1] user=%u,db=%d,app=%a '   # printf-style string to output at beginning of each log line.<br>log_connections = on<br>log_disconnections = on<br>log_standby_delay = 'always'<br>logging_collector = on<br>log_directory = '/var/log/pgpool-II'<br>log_filename = 'pgpool-01-%a.log'<br>log_truncate_on_rotation = on<br>log_rotation_age = 1d<br>log_rotation_size = 100MB<br>write_function_list = 'currval,lastval,nextval,setval,convert_.*,create_.*,delete_.*'<br>statement_level_load_balance = on<br>sr_check_period = 5<br>sr_check_user = 'postgres'<br>#delay_threshold = 1000000<br>delay_threshold_by_time = 1<br>health_check_period = 10<br>health_check_timeout = 30<br>health_check_user = 'postgres'<br>health_check_max_retries = 10<br>failover_on_backend_error = off<br>check_temp_table = trace</div>

</div>