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

Commitb2ed8ed

Browse files
committed
Fix bug in collecting total_latencies from all threads in pgbench.
This was broken in1bc90f7, which removed the thread-emulation. With modest-j and -c settings the result were usually close enough that you wouldn'tnotice it easily, but with a high enough thread count it would accessuninitialized memory and crash.Per report from Andres Freund offlist.
1 parent5e65f45 commitb2ed8ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/bin/pgbench/pgbench.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3456,8 +3456,8 @@ main(int argc, char **argv)
34563456
for (j=0;j<thread->nstate;j++)
34573457
{
34583458
total_xacts+=thread->state[j].cnt;
3459-
total_latencies+=thread->state[i].txn_latencies;
3460-
total_sqlats+=thread->state[i].txn_sqlats;
3459+
total_latencies+=thread->state[j].txn_latencies;
3460+
total_sqlats+=thread->state[j].txn_sqlats;
34613461
}
34623462
}
34633463
disconnect_all(state,nclients);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp