We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1013f9 commit 34df02dCopy full SHA for 34df02d
contrib/pg_stat_wait/collector.c
@@ -148,10 +148,12 @@ ReallocHistory(History *observations, int count)
148
newitems = (HistoryItem *) palloc0(sizeof(HistoryItem) * count);
149
150
if (observations->wraparound)
151
- copyCount = Min(observations->count, count);
+ copyCount = observations->count;
152
else
153
copyCount = observations->index;
154
155
+ copyCount = Min(copyCount, count);
156
+
157
i = 0;
158
j = observations->index;
159
while (i < copyCount)
0 commit comments