mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
Fix resp_calls array size
This got broken during a refactoring in de71282922. We need the plus 2
items because of the overflow/underflow bucket, without that we can
possibly overindex this array and corrupt other counters.
In earlier versions we even had the encoding variable stored directly
after this array, which possibly caused crashes or incorrectly working
string functions.
This commit is contained in:
@@ -325,8 +325,9 @@ typedef struct Counters
|
||||
JitInfo jitinfo;
|
||||
ErrorInfo error;
|
||||
Wal_Usage walusage;
|
||||
int resp_calls[MAX_RESPONSE_BUCKET]; /* execution time's in
|
||||
* msec */
|
||||
int resp_calls[MAX_RESPONSE_BUCKET + 2]; /* execution time's in
|
||||
* msec; including 2
|
||||
* outlier buckets */
|
||||
int64 parallel_workers_to_launch; /* # of parallel workers planned
|
||||
* to be launched */
|
||||
int64 parallel_workers_launched; /* # of parallel workers actually
|
||||
|
||||
Reference in New Issue
Block a user