PG-382: Adjust the maximum value for histogram buckets.

There was no maximum limit set for the number of maximum histograms
bucket, which can lead to a crash in case of higher value.

PG-382: Adjust the maximum value for histogram buckets.

Fix the regression issue for PostgreSQL-12.

PG-382: Adjust the maximum value for histogram buckets.

Fix the TAP test cases.
This commit is contained in:
Ibrar Ahmed
2022-05-24 05:13:06 +00:00
parent 1b995c768d
commit f60d3422df
22 changed files with 89 additions and 81 deletions

View File

@@ -2032,7 +2032,7 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
values[i++] = Float8GetDatumFast(tmp.blocks.blk_write_time);
/* resp_calls at column number 41 */
values[i++] = IntArrayGetTextDatum(tmp.resp_calls, MAX_RESPONSE_BUCKET);
values[i++] = IntArrayGetTextDatum(tmp.resp_calls, PGSM_HISTOGRAM_BUCKETS);
/* utime at column number 42 */
values[i++] = Float8GetDatumFast(roundf(tmp.sysinfo.utime,4));