forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite9d9ba2
committed
Avoid some other O(N^2) hazards in list manipulation.
In the same spirit as6301c3a, fix some more places where we wereusing list_delete_first() in a loop and thereby risking O(N^2)behavior. It's not clear that the lists manipulated in these spotscan get long enough to be really problematic ... but it's not clearthat they can't, either, and the fixes are simple enough.As before, back-patch to v13.Discussion:https://postgr.es/m/CD2F0E7F-9822-45EC-A411-AE56F14DEA9F@amazon.com1 parent40c516b commite9d9ba2
File tree
3 files changed
+27
-25
lines changed- contrib/pg_trgm
- src/backend
- executor
- jit/llvm
3 files changed
+27
-25
lines changedLines changed: 17 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
907 | 907 |
| |
908 | 908 |
| |
909 | 909 |
| |
| 910 | + | |
910 | 911 |
| |
911 | 912 |
| |
912 | 913 |
| |
| |||
937 | 938 |
| |
938 | 939 |
| |
939 | 940 |
| |
| 941 | + | |
| 942 | + | |
| 943 | + | |
940 | 944 |
| |
941 |
| - | |
| 945 | + | |
942 | 946 |
| |
943 |
| - | |
944 |
| - | |
945 |
| - | |
| 947 | + | |
946 | 948 |
| |
947 | 949 |
| |
948 | 950 |
| |
| |||
966 | 968 |
| |
967 | 969 |
| |
968 | 970 |
| |
| 971 | + | |
| 972 | + | |
969 | 973 |
| |
970 | 974 |
| |
971 | 975 |
| |
972 | 976 |
| |
973 | 977 |
| |
974 |
| - | |
| 978 | + | |
975 | 979 |
| |
976 | 980 |
| |
977 |
| - | |
| 981 | + | |
978 | 982 |
| |
979 |
| - | |
| 983 | + | |
980 | 984 |
| |
981 |
| - | |
| 985 | + | |
| 986 | + | |
982 | 987 |
| |
983 | 988 |
| |
984 | 989 |
| |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
985 | 994 |
| |
986 | 995 |
| |
987 | 996 |
| |
|
Lines changed: 5 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2584 | 2584 |
| |
2585 | 2585 |
| |
2586 | 2586 |
| |
2587 |
| - | |
2588 |
| - | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
2589 | 2590 |
| |
2590 | 2591 |
| |
2591 | 2592 |
| |
| |||
3098 | 3099 |
| |
3099 | 3100 |
| |
3100 | 3101 |
| |
3101 |
| - | |
| 3102 | + | |
3102 | 3103 |
| |
3103 | 3104 |
| |
3104 | 3105 |
| |
| |||
3113 | 3114 |
| |
3114 | 3115 |
| |
3115 | 3116 |
| |
3116 |
| - | |
3117 |
| - | |
3118 | 3117 |
| |
3119 | 3118 |
| |
3120 | 3119 |
| |
| |||
3132 | 3131 |
| |
3133 | 3132 |
| |
3134 | 3133 |
| |
3135 |
| - | |
3136 |
| - | |
3137 |
| - | |
3138 |
| - | |
3139 |
| - | |
3140 |
| - | |
3141 |
| - | |
| 3134 | + | |
3142 | 3135 |
| |
3143 | 3136 |
| |
3144 | 3137 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
| 174 | + | |
174 | 175 |
| |
175 | 176 |
| |
176 | 177 |
| |
| |||
188 | 189 |
| |
189 | 190 |
| |
190 | 191 |
| |
191 |
| - | |
| 192 | + | |
192 | 193 |
| |
193 |
| - | |
194 |
| - | |
195 |
| - | |
196 |
| - | |
| 194 | + | |
197 | 195 |
| |
198 | 196 |
| |
199 | 197 |
| |
| |||
221 | 219 |
| |
222 | 220 |
| |
223 | 221 |
| |
| 222 | + | |
| 223 | + | |
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
|
0 commit comments
Comments
(0)