From ebfade5e92553952d6caa54884ea4ab076a71d94 Mon Sep 17 00:00:00 2001 From: Hamid Akhtar Date: Wed, 29 Jun 2022 00:22:40 +0500 Subject: [PATCH] [PG-455] PGSM doesn't gather data for some pgsm_bucket_time settings Fixing the issue introduced by 7efc3fa. --- 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 8bb74bf..a9a0ab6 100644 --- a/pg_stat_monitor.c +++ b/pg_stat_monitor.c @@ -2111,7 +2111,7 @@ get_next_wbucket(pgssSharedState *pgss) * definitely make the while condition to fail, we can stop the loop as another * thread has already updated prev_bucket_sec. */ - if ((current_sec - current_bucket_sec) < ((uint64)PGSM_BUCKET_TIME * 1000LU * 1000LU)) + if ((current_sec - current_bucket_sec) < (uint64)PGSM_BUCKET_TIME) { return pg_atomic_read_u64(&pgss->current_wbucket); }