- Notifications
You must be signed in to change notification settings - Fork4.9k
Commite35d396
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 parent480acbb commite35d396
1 file changed
+20
-10
lines changedLines changed: 20 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5010 | 5010 |
| |
5011 | 5011 |
| |
5012 | 5012 |
| |
| 5013 | + | |
| 5014 | + | |
| 5015 | + | |
| 5016 | + | |
| 5017 | + | |
| 5018 | + | |
| 5019 | + | |
| 5020 | + | |
| 5021 | + | |
| 5022 | + | |
5013 | 5023 |
| |
5014 | 5024 |
| |
5015 | 5025 |
| |
| |||
5025 | 5035 |
| |
5026 | 5036 |
| |
5027 | 5037 |
| |
| 5038 | + | |
| 5039 | + | |
| 5040 | + | |
| 5041 | + | |
| 5042 | + | |
| 5043 | + | |
| 5044 | + | |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
5028 | 5048 |
| |
5029 | 5049 |
| |
5030 | 5050 |
| |
5031 | 5051 |
| |
5032 |
| - | |
5033 |
| - | |
5034 |
| - | |
5035 |
| - | |
5036 |
| - | |
5037 |
| - | |
5038 |
| - | |
5039 |
| - | |
5040 |
| - | |
5041 |
| - | |
5042 | 5052 |
| |
5043 | 5053 |
| |
5044 | 5054 |
| |
|
0 commit comments
Comments
(0)