- Notifications
You must be signed in to change notification settings - Fork28
Commitab9f2c4
committed
Prevent growth of simplehash tables when they're "too empty".
In cases where simplehash tables where filled with either a lot ofconflicting hash-values, or values that hash to consecutivevalues (i.e. build "chains") the growth heuristics ind4c62a6 could trigger ratherexplosively.To fix that, address some of the reasons (see previous commit) of whythe growth heuristics where needed, and only allow growth when thetable isn't too empty. While that means there's a few cases of badinput that can be slower, that seems a lot better than running veryquickly out of memory.Author: Tomas Vondra and Andres Freund, with additional input by Thomas Munro, Tom Lane Todd A. CookReported-By: Todd A. Cook, Tomas Vondra, Thomas MunroDiscussion:https://postgr.es/m/20171127185700.1470.20362@wrigleys.postgresql.orgBackpatch: 10, where simplehash was introduced1 parentc068f87 commitab9f2c4
1 file changed
+15
-4
lines changedLines changed: 15 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
174 | 174 |
| |
175 | 175 |
| |
176 | 176 |
| |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
177 | 181 |
| |
178 | 182 |
| |
179 | 183 |
| |
| |||
574 | 578 |
| |
575 | 579 |
| |
576 | 580 |
| |
577 |
| - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
578 | 584 |
| |
579 |
| - | |
| 585 | + | |
| 586 | + | |
580 | 587 |
| |
581 | 588 |
| |
582 | 589 |
| |
| |||
621 | 628 |
| |
622 | 629 |
| |
623 | 630 |
| |
624 |
| - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
625 | 634 |
| |
626 |
| - | |
| 635 | + | |
| 636 | + | |
627 | 637 |
| |
628 | 638 |
| |
629 | 639 |
| |
| |||
923 | 933 |
| |
924 | 934 |
| |
925 | 935 |
| |
| 936 | + | |
926 | 937 |
| |
927 | 938 |
| |
928 | 939 |
| |
|
0 commit comments
Comments
(0)