forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit08e1eed
committed
Fix performance problem when building a lossy tidbitmap.
As pointed out by Sergey Koposov, repeated invocations of tbm_lossify canmake building a large tidbitmap into an O(N^2) operation. To fix, makesure we remove more than the minimum amount of information per call, andadd a fallback path to behave sanely if we're unable to fit the bitmapwithin the requested amount of memory.This has been wrong since the tidbitmap code was written, so back-patchto all supported branches.1 parentee639d2 commit08e1eed
1 file changed
+19
-3
lines changedLines changed: 19 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
953 | 953 |
| |
954 | 954 |
| |
955 | 955 |
| |
956 |
| - | |
957 |
| - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
958 | 961 |
| |
959 | 962 |
| |
960 | 963 |
| |
| |||
975 | 978 |
| |
976 | 979 |
| |
977 | 980 |
| |
978 |
| - | |
| 981 | + | |
979 | 982 |
| |
980 | 983 |
| |
981 | 984 |
| |
| |||
988 | 991 |
| |
989 | 992 |
| |
990 | 993 |
| |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
991 | 1007 |
| |
992 | 1008 |
| |
993 | 1009 |
| |
|
0 commit comments
Comments
(0)