- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit21b815f
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 parentbbf1ef7 commit21b815f
1 file changed
+20
-10
lines changedLines changed: 20 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4983 | 4983 |
| |
4984 | 4984 |
| |
4985 | 4985 |
| |
| 4986 | + | |
| 4987 | + | |
| 4988 | + | |
| 4989 | + | |
| 4990 | + | |
| 4991 | + | |
| 4992 | + | |
| 4993 | + | |
| 4994 | + | |
| 4995 | + | |
4986 | 4996 |
| |
4987 | 4997 |
| |
4988 | 4998 |
| |
| |||
4997 | 5007 |
| |
4998 | 5008 |
| |
4999 | 5009 |
| |
| 5010 | + | |
| 5011 | + | |
| 5012 | + | |
| 5013 | + | |
| 5014 | + | |
| 5015 | + | |
| 5016 | + | |
| 5017 | + | |
| 5018 | + | |
| 5019 | + | |
5000 | 5020 |
| |
5001 | 5021 |
| |
5002 | 5022 |
| |
5003 | 5023 |
| |
5004 |
| - | |
5005 |
| - | |
5006 |
| - | |
5007 |
| - | |
5008 |
| - | |
5009 |
| - | |
5010 |
| - | |
5011 |
| - | |
5012 |
| - | |
5013 |
| - | |
5014 | 5024 |
| |
5015 | 5025 |
| |
5016 | 5026 |
| |
|
0 commit comments
Comments
(0)