public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH] Downgrade elog(LOG) to elog(DEBUG1) for pi->node_ids in get_pools()
2+ messages / 2 participants
[nested] [flat]

* [PATCH] Downgrade elog(LOG) to elog(DEBUG1) for pi->node_ids in get_pools()
@ 2026-03-04 18:39 Yishai Tamir <[email protected]>
  2026-03-05 04:16 ` Re: [PATCH] Downgrade elog(LOG) to elog(DEBUG1) for pi->node_ids in get_pools() Tatsuo Ishii <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Yishai Tamir @ 2026-03-04 18:39 UTC (permalink / raw)
  To: [email protected] <[email protected]>

Hi,

  The attached patch downgrades an elog(LOG) to elog(DEBUG1) in get_pools()
  (src/utils/pool_process_reporting.c).

  The elog statement was added in commit 706ca859c as part of the
  pgpool_adm_pcp_proc_info feature. It prints pi->node_ids bitmap values
  at LOG level for every connection on every backend whenever pool status
  is queried.

  In containerized deployments where a metrics exporter (pgpool2_exporter)
  continuously polls "show pool_pools", this produces thousands of log
  lines per minute. We confirmed the fix eliminates the spam on our
  staging cluster under real production-like traffic.

  Since the message is purely diagnostic, DEBUG1 is the appropriate level.

  GitHub issue: https://github.com/pgpool/pgpool2/issues/153

  Regards,
  Yishai Tamir


Attachments:

  [application/octet-stream] 0001-Downgrade-elog-LOG-to-elog-DEBUG1-for-pi-node_ids-in.patch (1.3K, 3-0001-Downgrade-elog-LOG-to-elog-DEBUG1-for-pi-node_ids-in.patch)
  download | inline diff:
From 29d4b188674ed7b328e4f1d29857abe37ac1fe97 Mon Sep 17 00:00:00 2001
From: Yishai Tamir <[email protected]>
Date: Wed, 4 Mar 2026 20:27:21 +0200
Subject: [PATCH] Downgrade elog(LOG) to elog(DEBUG1) for pi->node_ids in
 get_pools()

The elog statement added in commit 706ca859c prints pi->node_ids
bitmap values at LOG level for every connection/backend combination
whenever pool status is queried. In deployments with metrics exporters
that poll "show pool_pools" continuously, this produces thousands of
log lines per minute. Since the message is purely diagnostic, it
should be at DEBUG1 level.

Reported in: https://github.com/pgpool/pgpool2/issues/153
---
 src/utils/pool_process_reporting.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/utils/pool_process_reporting.c b/src/utils/pool_process_reporting.c
index 39087bc47..256c3e977 100644
--- a/src/utils/pool_process_reporting.c
+++ b/src/utils/pool_process_reporting.c
@@ -1703,7 +1703,7 @@ get_pools(int *nrows)
 				if (is_pi_set(pi->node_ids, backend_id))
 				{
 					StrNCpy(pools[lines].statement, pi->statement, MAXSTMTLEN);
-					elog(LOG, "pi->node_ids[0]:%ld pi->node_ids[1]:%ld",
+					elog(DEBUG1, "pi->node_ids[0]:%ld pi->node_ids[1]:%ld",
 						 pi->node_ids[0], pi->node_ids[1]);
 				}
 				lines++;
-- 
2.50.1



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [PATCH] Downgrade elog(LOG) to elog(DEBUG1) for pi->node_ids in get_pools()
  2026-03-04 18:39 [PATCH] Downgrade elog(LOG) to elog(DEBUG1) for pi->node_ids in get_pools() Yishai Tamir <[email protected]>
@ 2026-03-05 04:16 ` Tatsuo Ishii <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tatsuo Ishii @ 2026-03-05 04:16 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

> Hi,
> 
>   The attached patch downgrades an elog(LOG) to elog(DEBUG1) in get_pools()
>   (src/utils/pool_process_reporting.c).
> 
>   The elog statement was added in commit 706ca859c as part of the
>   pgpool_adm_pcp_proc_info feature. It prints pi->node_ids bitmap values
>   at LOG level for every connection on every backend whenever pool status
>   is queried.
> 
>   In containerized deployments where a metrics exporter (pgpool2_exporter)
>   continuously polls "show pool_pools", this produces thousands of log
>   lines per minute. We confirmed the fix eliminates the spam on our
>   staging cluster under real production-like traffic.
> 
>   Since the message is purely diagnostic, DEBUG1 is the appropriate level.
> 
>   GitHub issue: https://github.com/pgpool/pgpool2/issues/153

Thanks for the patch. I have already pushed a very similar patch
created by me.
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=f647c4a372ea2c2cfae80e4e60f209e236fe41ec

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-03-05 04:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-04 18:39 [PATCH] Downgrade elog(LOG) to elog(DEBUG1) for pi->node_ids in get_pools() Yishai Tamir <[email protected]>
2026-03-05 04:16 ` Tatsuo Ishii <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox