PG-607: Allow histogram to track queries in sub-ms time brackets (#384)

* PG-607: Allow histogram to track queries in sub-ms time brackets

Updated the GUC configuration and the relevant histogram functionality
to track queries in lower cardinality than ms. This is done by saving
the GUC values for histogram min and max values in real (double) type.

All test cases except for the 030 tap test are passing. The test case
needs an update.

* Fixing regression issues for v12 and below because of histogram changes.
This commit is contained in:
Muhammad Usama
2023-02-23 21:24:40 +05:00
committed by GitHub
parent 05ffcac2fa
commit fe23d31bf9
10 changed files with 74 additions and 73 deletions

View File

@@ -74,7 +74,7 @@
#define JUMBLE_SIZE 1024 /* query serialization buffer size */
#define HISTOGRAM_MAX_TIME INT_MAX
#define HISTOGRAM_MAX_TIME 50000000
#define MAX_RESPONSE_BUCKET 50
#define INVALID_BUCKET_ID -1
#define MAX_BUCKETS 10
@@ -506,8 +506,8 @@ extern int pgsm_query_max_len;
extern int pgsm_bucket_time;
extern int pgsm_max_buckets;
extern int pgsm_histogram_buckets;
extern int pgsm_histogram_max;
extern int pgsm_histogram_min;
extern double pgsm_histogram_min;
extern double pgsm_histogram_max;
extern int pgsm_query_shared_buffer;
extern bool pgsm_track_planning;
extern bool pgsm_extract_comments;