[pgpool-committers: 8334] pgpool: Change the way to obtain replication delay when delay_threshold

Tatsuo Ishii ishii at sraoss.co.jp
Sat Jan 29 17:51:07 JST 2022


Change the way to obtain replication delay when delay_threshold_by_time is specified.

Use pg_stat_replication.replay_lag.  This way makes the code much
simpler and more precise replication delay can be obtained. The only
downside is pg_stat_replication.replay_lag is only available in
PostgreSQL 10 or later (previous method can be used in 9.5 or later).
I think the down side is not worth the trouble and we should use
pg_stat_replication.replay_lag.

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2022-January/004109.html

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=515860f3d040b7ccbad9ed89216cad76df99295a

Modified Files
--------------
doc.ja/src/sgml/stream-check.sgml             |  42 +++---
doc/src/sgml/stream-check.sgml                |  36 ++---
src/sample/pgpool.conf.sample-stream          |   5 +
src/streaming_replication/pool_worker_child.c | 196 +++++++-------------------
src/tools/pcp/pcp_frontend_client.c           |   2 +-
src/utils/pool_process_reporting.c            |   2 +-
6 files changed, 97 insertions(+), 186 deletions(-)



More information about the pgpool-committers mailing list