forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9bcbd7c
committed
pgbench: Stop counting skipped transactions as soon as timer is exceeded.
When throttling is used, transactions that lag behind schedule bymore than the latency limit are counted and reported as skipped.Previously, there was the case where pgbench counted all skippedtransactions even if the timer specified in -T option was exceeded.This could take a very long time to do that especially when unrealisticallyhigh rate setting in -R option caused quite a lot of transactions thatlagged behind schedule. This could prevent pgbench from endingimmediately, and so pgbench could look like it got stuck to users.To fix the issue, this commit changes pgbench so that it stops countingskipped transactions as soon as the timer is exceeded. The timer canmake pgbench end soon even when there are lots of skipped transactionsthat have not been counted yet.Note that there is no guarantee that all skipped transactions arecounted under -T though there is under -t. This is OK in practicebecause it's very unlikely to happen with realistic setting. Also this isnot the issue that this commit newly introdues. There used to bethe case where pgbench ended without counting all skippedtransactions since before.Back-patch to v14. Per discussion, we decided not to botherback-patch to the stable branches because it's hard to imaginethe issue happens in practice (with realistic setting).Author: Yugo Nagata, Fabien COELHOReviewed-by: Greg Sabino Mullane, Fujii MasaoDiscussion:https://postgr.es/m/20210613040151.265ff59d832f835bbcf8b3ba@sraoss.co.jp1 parent8481f99 commit9bcbd7c
1 file changed
+22
-17
lines changedLines changed: 22 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3233 | 3233 |
| |
3234 | 3234 |
| |
3235 | 3235 |
| |
3236 |
| - | |
3237 |
| - | |
3238 |
| - | |
| 3236 | + | |
| 3237 | + | |
3239 | 3238 |
| |
3240 | 3239 |
| |
3241 | 3240 |
| |
3242 | 3241 |
| |
3243 | 3242 |
| |
3244 |
| - | |
3245 |
| - | |
| 3243 | + | |
3246 | 3244 |
| |
3247 | 3245 |
| |
3248 |
| - | |
3249 |
| - | |
3250 |
| - | |
3251 |
| - | |
3252 |
| - | |
3253 | 3246 |
| |
3254 |
| - | |
3255 |
| - | |
3256 |
| - | |
3257 |
| - | |
3258 |
| - | |
3259 |
| - | |
3260 |
| - | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
3261 | 3266 |
| |
3262 | 3267 |
| |
3263 | 3268 |
| |
|
0 commit comments
Comments
(0)