mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
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:
committed by
Muhammad Usama
parent
1286427445
commit
209f370cef
@@ -63,7 +63,7 @@ SELECT
|
||||
$$
|
||||
LANGUAGE SQL PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION histogram(_bucket int, _quryid text)
|
||||
CREATE FUNCTION histogram(_bucket int, _quryid int8)
|
||||
RETURNS SETOF RECORD AS $$
|
||||
DECLARE
|
||||
rec record;
|
||||
@@ -463,4 +463,3 @@ REVOKE ALL ON FUNCTION pgsm_create_14_view FROM PUBLIC;
|
||||
REVOKE ALL ON FUNCTION pgsm_create_15_view FROM PUBLIC;
|
||||
|
||||
GRANT SELECT ON pg_stat_monitor TO PUBLIC;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user