- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit5addea7
committed
Fix pgbench performance issue induced by commitaf35fe5.
Commitaf35fe5 caused "pgbench -i" to emit a '\r' characterfor each data row loaded (when stderr is a terminal).That's effectively invisible on-screen, but it causes theconnected terminal program to consume a lot of cycles.It's even worse if you're connected over ssh, as the datathen has to pass through the ssh tunnel.Simplest fix is to move the added logic inside the if-teststhat check whether to print a progress line. We could doit another way that avoids duplicating these few lines,but on the whole this seems the most transparent way towrite it.Like the previous commit, back-patch to all supported versions.Reported-by: Andres Freund <andres@anarazel.de>Author: Tom Lane <tgl@sss.pgh.pa.us>Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Discussion:https://postgr.es/m/4k4drkh7bcmdezq6zbkhp25mnrzpswqi2o75d5uv2eeg3aq6q7@b7kqdmzzwzgbBackpatch-through: 131 parent9f6ad2f commit5addea7
1 file changed
+20
-10
lines changedLines changed: 20 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4312 | 4312 |
| |
4313 | 4313 |
| |
4314 | 4314 |
| |
| 4315 | + | |
| 4316 | + | |
| 4317 | + | |
| 4318 | + | |
| 4319 | + | |
| 4320 | + | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
| 4324 | + | |
4315 | 4325 |
| |
4316 | 4326 |
| |
4317 | 4327 |
| |
| |||
4326 | 4336 |
| |
4327 | 4337 |
| |
4328 | 4338 |
| |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
4329 | 4349 |
| |
4330 | 4350 |
| |
4331 | 4351 |
| |
4332 | 4352 |
| |
4333 |
| - | |
4334 |
| - | |
4335 |
| - | |
4336 |
| - | |
4337 |
| - | |
4338 |
| - | |
4339 |
| - | |
4340 |
| - | |
4341 |
| - | |
4342 |
| - | |
4343 | 4353 |
| |
4344 | 4354 |
| |
4345 | 4355 |
| |
|
0 commit comments
Comments
(0)