pgpool2.git / summary / log / commit / refs

commit    bbfe3adb24c0380f5e138d97cd88dc4ac9bd1d3f
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Sun Jul 28 02:05:51 2019 +0000

    Adjust WHERE clause of pg_stat_replication to not issue against down node.
    
    Previously the query to get replication status was unconditionally
    issued to down node, which produced annoying "no row returned" log.


src/streaming_replication/pool_worker_child.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/streaming_replication/pool_worker_child.c b/src/streaming_replication/pool_worker_child.c index f73141918..2ae6d7ddb 100644 --- a/src/streaming_replication/pool_worker_child.c +++ b/src/streaming_replication/pool_worker_child.c @@ -401,6 +401,8 @@ check_replication_time_lag(void) *bkinfo->replication_state = '\0'; *bkinfo->replication_sync_state = '\0'; + if (!VALID_BACKEND(i)) + continue; if (i == PRIMARY_NODE_ID) continue; if (*stat_rep_query == '\0') [parent: 3768a24aad14]