PG-562: Histogram Ranges/Buckets are not correct.

Added buckets for queries that take less than minimum histogram time
and one for the ones taking more than the max value specified.

Also, in case the buckets end up overlapping, on server start, an
error will be thrown informing the user of this issue and requesting
a rectification.

Refactored the code to consolidate the calculations in a single
function.
This commit is contained in:
Hamid Akhtar
2023-01-19 05:39:37 +05:00
committed by Muhammad Usama
parent 1286427445
commit 209f370cef
8 changed files with 109 additions and 92 deletions

2
guc.c
View File

@@ -150,7 +150,7 @@ init_guc(void)
.guc_max = MAX_RESPONSE_BUCKET,
.guc_restart = true,
.guc_unit = 0,
.guc_value = &PGSM_HISTOGRAM_BUCKETS
.guc_value = &PGSM_HISTOGRAM_BUCKETS_USER
};
DefineIntGUC(&conf[i++]);