[pgpool-hackers: 4379] Re: delay_threshold_by_time

Tatsuo Ishii ishii at sraoss.co.jp
Sat Aug 19 18:51:05 JST 2023


> Hi,
> 
>>From a user's request: [pgpool-general: 8746] setting "delay_threshold_by_time" to less than 1 second
> https://www.pgpool.net/pipermail/pgpool-general/2023-April/008807.html
> I am working on implementing this for upcoming Pgpool-II 4.5.
> 
> Initially I thought this does not make too much sense because
> replication delay is monitored every 1 second even the most
> frequent. But after think more, it could be possible that the delay is
> not so fluctuate significantly, and the monitoring interval is not
> necessarily less than 1 second to catch the replication delay below 1
> second.
> 
> Attached is the patch to implement this. In the patch I not only made
> changes for the request above, but put some refactoring. I created new
> function "check_replication_delay" which checks the replication delay
> and returns 0, -1 or -2, depending on "no delay", "delayed
> (delay_threshold_by_time)" or "delayed (delay_threshold)"
> accordingly. This should simplify the lengthy if-statement to check
> the replication delay.

Patch pushed to master branch.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list