[pgpool-hackers: 4371] delay_threshold_by_time
Tatsuo Ishii
ishii at sraoss.co.jp
Wed Aug 16 14:12:51 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.
Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delay_threshold_by_time.patch
Type: text/x-patch
Size: 12054 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20230816/9a68934b/attachment.bin>
More information about the pgpool-hackers
mailing list