forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit95dbd82
committed
EXPLAIN: Always use two fractional digits for row counts.
Commitddb17e3 attempted to avoidconfusing users by displaying digits after the decimal point only whennloops > 1, since it's impossible to have a fraction row count after asingle iteration. However, this made the regression tests unstable sinceparallal queries will have nloops>1 for all nodes below the Gather orGather Merge in normal cases, but if the workers don't start in time andthe leader finishes all the work, they will suddenly have nloops==1,making it unpredictable whether the digits after the decimal point wouldbe displayed or not. Although44cbba9seemed to fix the immediate failures, it may still be the case that thereare lower-probability failures elsewhere in the regression tests.Various fixes are possible here. For example, it has previously beenproposed that we should try to display the digits after the decimalpoint only if rows/nloops is an integer, but currently rows is storeadas a float so it's not theoretically an exact quantity -- precisioncould be lost in extreme cases. It has also been proposed that weshould try to display the digits after the decimal point only if we'reunder some sort of construct that could potentially cause loopingregardless of whether it actually does. While such ideas are notwithout merit, this patch adopts the much simpler solution of alwaysdisplay two decimal digits. If that approach stands up to scrutinyfrom the buildfarm and human users, it spares us the trouble of doinganything more complex; if not, we can reassess.This commit incidentally reverts44cbba9,which should no longer be needed.Author: Robert Haas <robertmhaas@gmail.com>Author: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>Discussion:http://postgr.es/m/CA+TgmoazzVHn8sFOMFAEwoqBTDxKT45D7mvkyeHgqtoD2cn58Q@mail.gmail.com1 parentce62f2f commit95dbd82
File tree
25 files changed
+623
-649
lines changed- contrib
- pg_stat_statements/expected
- postgres_fdw/expected
- doc/src/sgml
- ref
- src
- backend/commands
- test/regress
- expected
- sql
25 files changed
+623
-649
lines changedLines changed: 12 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
904 | 904 |
| |
905 | 905 |
| |
906 | 906 |
| |
907 |
| - | |
908 |
| - | |
909 |
| - | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
910 | 910 |
| |
911 | 911 |
| |
912 | 912 |
| |
913 | 913 |
| |
914 |
| - | |
915 |
| - | |
916 |
| - | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
917 | 917 |
| |
918 | 918 |
| |
919 | 919 |
| |
| |||
937 | 937 |
| |
938 | 938 |
| |
939 | 939 |
| |
940 |
| - | |
941 |
| - | |
942 |
| - | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
943 | 943 |
| |
944 | 944 |
| |
945 | 945 |
| |
946 | 946 |
| |
947 |
| - | |
948 |
| - | |
949 |
| - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
950 | 950 |
| |
951 | 951 |
| |
952 | 952 |
| |
|
Lines changed: 30 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11670 | 11670 |
| |
11671 | 11671 |
| |
11672 | 11672 |
| |
11673 |
| - | |
11674 |
| - | |
11675 |
| - | |
11676 |
| - | |
| 11673 | + | |
| 11674 | + | |
| 11675 | + | |
| 11676 | + | |
11677 | 11677 |
| |
11678 | 11678 |
| |
11679 |
| - | |
| 11679 | + | |
11680 | 11680 |
| |
11681 |
| - | |
| 11681 | + | |
11682 | 11682 |
| |
11683 | 11683 |
| |
11684 | 11684 |
| |
| |||
11916 | 11916 |
| |
11917 | 11917 |
| |
11918 | 11918 |
| |
11919 |
| - | |
11920 |
| - | |
11921 |
| - | |
| 11919 | + | |
| 11920 | + | |
| 11921 | + | |
11922 | 11922 |
| |
11923 | 11923 |
| |
11924 | 11924 |
| |
11925 |
| - | |
11926 |
| - | |
11927 |
| - | |
11928 |
| - | |
11929 |
| - | |
11930 |
| - | |
11931 |
| - | |
11932 |
| - | |
| 11925 | + | |
| 11926 | + | |
| 11927 | + | |
| 11928 | + | |
| 11929 | + | |
| 11930 | + | |
| 11931 | + | |
| 11932 | + | |
11933 | 11933 |
| |
11934 | 11934 |
| |
11935 | 11935 |
| |
| |||
11960 | 11960 |
| |
11961 | 11961 |
| |
11962 | 11962 |
| |
11963 |
| - | |
11964 |
| - | |
11965 |
| - | |
11966 |
| - | |
11967 |
| - | |
| 11963 | + | |
| 11964 | + | |
| 11965 | + | |
| 11966 | + | |
| 11967 | + | |
11968 | 11968 |
| |
11969 |
| - | |
| 11969 | + | |
11970 | 11970 |
| |
11971 |
| - | |
| 11971 | + | |
11972 | 11972 |
| |
11973 | 11973 |
| |
11974 | 11974 |
| |
| |||
12120 | 12120 |
| |
12121 | 12121 |
| |
12122 | 12122 |
| |
12123 |
| - | |
12124 |
| - | |
12125 |
| - | |
12126 |
| - | |
12127 |
| - | |
12128 |
| - | |
| 12123 | + | |
| 12124 | + | |
| 12125 | + | |
| 12126 | + | |
| 12127 | + | |
| 12128 | + | |
12129 | 12129 |
| |
12130 | 12130 |
| |
12131 | 12131 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
337 | 337 |
| |
338 | 338 |
| |
339 | 339 |
| |
340 |
| - | |
341 |
| - | |
| 340 | + | |
| 341 | + | |
342 | 342 |
| |
343 |
| - | |
344 |
| - | |
| 343 | + | |
| 344 | + | |
345 | 345 |
| |
346 |
| - | |
| 346 | + | |
347 | 347 |
| |
348 | 348 |
| |
349 | 349 |
| |
|
Lines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
| 121 | + | |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| |||
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 |
| - | |
| 169 | + | |
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
174 |
| - | |
| 174 | + | |
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
| |||
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
204 |
| - | |
| 204 | + | |
205 | 205 |
| |
206 | 206 |
| |
207 |
| - | |
| 207 | + | |
208 | 208 |
| |
209 |
| - | |
| 209 | + | |
210 | 210 |
| |
211 | 211 |
| |
212 |
| - | |
| 212 | + | |
213 | 213 |
| |
214 | 214 |
| |
215 | 215 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
151 |
| - | |
| 151 | + | |
152 | 152 |
| |
153 |
| - | |
| 153 | + | |
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
| |||
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
168 |
| - | |
| 168 | + | |
169 | 169 |
| |
170 |
| - | |
| 170 | + | |
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
|
0 commit comments
Comments
(0)