Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34df02d

Browse files
akorotkovAlexander Korotkov
authored and
Alexander Korotkov
committed
Fix number of copying history items.
1 parente1013f9 commit34df02d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎contrib/pg_stat_wait/collector.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@ ReallocHistory(History *observations, int count)
148148
newitems= (HistoryItem*)palloc0(sizeof(HistoryItem)*count);
149149

150150
if (observations->wraparound)
151-
copyCount=Min(observations->count,count);
151+
copyCount=observations->count;
152152
else
153153
copyCount=observations->index;
154154

155+
copyCount=Min(copyCount,count);
156+
155157
i=0;
156158
j=observations->index;
157159
while (i<copyCount)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp