From 8286fc44b06b0dc7d0f55692a4b60be7c4f57f7a Mon Sep 17 00:00:00 2001 From: Ibrar Ahmed Date: Wed, 20 Nov 2019 12:00:00 +0000 Subject: [PATCH] Issue - (#4): Missed to update the "total_calls" when executing the same query multiple times. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forgot to update the "total_calls" column when a query executes multipletimes, during refactoring.  --- pg_stat_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pg_stat_monitor.c b/pg_stat_monitor.c index 518bde4..f273906 100644 --- a/pg_stat_monitor.c +++ b/pg_stat_monitor.c @@ -3472,7 +3472,7 @@ update_agg_counters(uint64 queryid, uint64 id, uint64 type) entry->key.queryid = queryid; entry->key.id = id; entry->key.type = key.type; - entry->counters.total_calls = 1; + entry->counters.total_calls++; if (entry->counters.total_calls == 1) entry->counters.first_call_time = GetCurrentTimestamp(); entry->counters.last_call_time= GetCurrentTimestamp();