Feature: allow to set delay_threshold_by_time in milliseconds.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Sat, 19 Aug 2023 06:44:02 +0000 (15:44 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Sat, 19 Aug 2023 06:44:02 +0000 (15:44 +0900)
commit2efc59eeeff04ca2bb986c9591a249d8b64188f2
tree2446dee66f8c6228e21921a51b521e35809ff740
parent8f760f06d31117853da007c547b2f0e26aa1ea80
Feature: allow to set delay_threshold_by_time in milliseconds.

Previously it was allowed only in seconds.  Also put some
refactoring. Create 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.

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-August/004372.html
doc.ja/src/sgml/stream-check.sgml
doc/src/sgml/stream-check.sgml
src/config/pool_config_variables.c
src/context/pool_query_context.c
src/include/protocol/pool_pg_utils.h
src/protocol/pool_pg_utils.c
src/sample/pgpool.conf.sample-stream
src/streaming_replication/pool_worker_child.c
src/test/regression/tests/033.prefer_lower_standby_delay/test.sh