Fix too many log lines produced by streaming replication check.
authorTatsuo Ishii <ishii@postgresql.org>
Mon, 10 Feb 2025 09:28:51 +0000 (18:28 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Mon, 10 Feb 2025 09:43:18 +0000 (18:43 +0900)
The process started to call
get_pg_backend_status_from_leader_wd_node() which unconditionally emits
log message:

LOG:  received the get data request from local pgpool-II on IPC interface

LOG:  get data request from local pgpool-II node received on IPC interface is forwarded to leader watchdog node

every sr_check_period seconds, which is annoying. To fix this, an elog
line in process_IPC_data_request_from_leader() is downgraded from LOG
to DEBUG1.

Reported-by: Bo Peng.
src/watchdog/watchdog.c

index 8b6fb76ccf3f5579513dcf3fd8e241ce0c67fdea..faab4e6e5b8cd07c20226f3ed81b6cff7901740d 100644 (file)
@@ -5,7 +5,7 @@
  * pgpool: a language independent connection pool server for PostgreSQL
  * written by Tatsuo Ishii
  *
- * Copyright (c) 2003-2024     PgPool Global Development Group
+ * Copyright (c) 2003-2025     PgPool Global Development Group
  *
  * Permission to use, copy, modify, and distribute this software and
  * its documentation for any purpose and without fee is hereby
@@ -3034,7 +3034,7 @@ static IPC_CMD_PROCESS_RES process_IPC_data_request_from_leader(WDCommandData *
         * if cluster or myself is not in stable state just return cluster in
         * transaction
         */
-       ereport(LOG,
+       ereport(DEBUG1,
                        (errmsg("received the get data request from local pgpool-II on IPC interface")));
 
        if (get_local_node_state() == WD_STANDBY)
@@ -3059,7 +3059,7 @@ static IPC_CMD_PROCESS_RES process_IPC_data_request_from_leader(WDCommandData *
                        /*
                         * we need to wait for the result
                         */
-                       ereport(LOG,
+                       ereport(DEBUG1,
                                        (errmsg("get data request from local pgpool-II node received on IPC interface is forwarded to leader watchdog node \"%s\"",
                                                        WD_LEADER_NODE->nodeName),
                                         errdetail("waiting for the reply...")));