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

Commitde8e46f

Browse files
committed
Suppress bogus statistics when pgbench failed to complete any transactions.
Code added in 9.4 would attempt to divide by zero in such cases.Noted while testing fix for missing-pclose problem.
1 parentd38e8d3 commitde8e46f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎contrib/pgbench/pgbench.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,10 @@ printResults(int ttype, int64 normal_xacts, int nclients,
25412541
normal_xacts);
25422542
}
25432543

2544+
/* Remaining stats are nonsensical if we failed to execute any xacts */
2545+
if (normal_xacts <=0)
2546+
return;
2547+
25442548
if (throttle_delay&&latency_limit)
25452549
printf("number of transactions skipped: "INT64_FORMAT" (%.3f %%)\n",
25462550
throttle_latency_skipped,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp