Skip to content

Leftover debug log "status_changed_time" floods the log in pool_process_reporting.c #171

Description

@seoktai-chun

I believe there is a leftover debug log statement in
src/utils/pool_process_reporting.c.

In the function that builds the health check statistics report (the loop over
NUM_BACKENDS that fills POOL_HEALTH_CHECK_STATS), there is this line:

/* status last changed */
t = bi->status_changed_time;
ereport(LOG, (errmsg("status_changed_time %lld", (long long) t)));   /* <-- this line */
strftime(stats[i].last_status_change, POOLCONFIG_MAXDATELEN, "%F %T", localtime(&t));

This emits a LOG: status_changed_time <epoch> message for every backend each
time the function is called. On a running system this shows up repeatedly in the
pgpool log (once per backend), e.g.:

2026-08-28 12:06:46.015: [unknown] pid 217627: LOG:  status_changed_time 1787886194
2026-08-28 12:06:46.015: [unknown] pid 217627: LOG:  status_changed_time 1787886194

Because it is emitted at LOG level, it keeps appearing in the server log file
even when log_min_messages = warning is configured, which pollutes the log.

The analogous code in nodes_reporting() (SHOW pool_nodes) does the same
"status last changed" handling but does NOT emit such a log line, which suggests
the ereport(LOG, ...) above is a leftover debugging statement.

This line is present in 4.7.2 and also still present on the current master
branch (src/utils/pool_process_reporting.c).

Proposed fix: simply remove that ereport(LOG, ...) line.

 		/* status last changed */
 		t = bi->status_changed_time;
-		ereport(LOG, (errmsg("status_changed_time %lld", (long long) t)));
 		strftime(stats[i].last_status_change, POOLCONFIG_MAXDATELEN, "%F %T", localtime(&t));

Environment:

  • Pgpool-II 4.7.2, streaming replication mode
  • PostgreSQL 17.9, 2 backend nodes
  • The report/stats function is invoked periodically in our setup, so the log
    appears roughly every ~15s (twice, once per backend).

Thanks for maintaining pgpool-II.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions