pgpool: Report replication delay as -1 for down standby nodes

From: Taiki Koshino <koshino(at)sraoss(dot)co(dot)jp>
To: pgpool-committers(at)lists(dot)postgresql(dot)org
Subject: pgpool: Report replication delay as -1 for down standby nodes
Date: 2026-10-05 05:27:54
Message-ID: E1xDbEw-00000006Pax-0lbm@gothos.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-committers

Report replication delay as -1 for down standby nodes

SHOW POOL_NODES and pcp_node_info reported the last measured replication
delay after a standby node became down or was detached. The value could
be stale because replication delay cannot be measured for a down node.

Report the delay as "-1" for a down standby in both commands.
Keep the stored value unchanged to avoid treating an unmeasured delay
as zero when the standby is attached again.

Update the 003.failover regression test expectations for the new
SHOW POOL_NODES output.

Author: Taiki Koshino <koshino(at)sraoss(dot)co(dot)jp>
Discussion: https://github.com/pgpool/pgpool2/issues/131

Branch
------
master

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

Modified Files
--------------
src/test/regression/tests/003.failover/create_expected.sql | 2 +-
.../regression/tests/003.failover/create_expected_node0.sql | 2 +-
src/tools/pcp/pcp_frontend_client.c | 7 ++++++-
src/utils/pool_process_reporting.c | 10 +++++++++-
4 files changed, 17 insertions(+), 4 deletions(-)

Browse pgpool-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2026-10-06 06:04:06 pgpool: Test: stabilize 006.memqcache regression test.
Previous Message Tatsuo Ishii 2026-10-01 11:16:51 pgpool: Fix lifecheck buffer overrun.