forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc2dc7b9
committed
Flush Memoize cache when non-key parameters change, take 2
It's possible that a subplan below a Memoize node contains a parameterfrom above the Memoize node. If this parameter changes then cache entriesmay become out-dated due to the new parameter value.Previously Memoize was mistakenly not aware of this. We fix this here byflushing the cache whenever a parameter that's not part of the cachekey changes.Bug: #17213Reported by: Elvis PranskevichusAuthor: David RowleyDiscussion:https://postgr.es/m/17213-988ed34b225a2862@postgresql.orgBackpatch-through: 14, where Memoize was added1 parent0e681fa commitc2dc7b9
File tree
12 files changed
+145
-3
lines changed- src
- backend
- executor
- nodes
- optimizer
- plan
- util
- include
- nodes
- optimizer
- test/regress
- expected
- sql
12 files changed
+145
-3
lines changedLines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
367 | 367 |
| |
368 | 368 |
| |
369 | 369 |
| |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
370 | 401 |
| |
371 | 402 |
| |
372 | 403 |
| |
| |||
979 | 1010 |
| |
980 | 1011 |
| |
981 | 1012 |
| |
| 1013 | + | |
982 | 1014 |
| |
983 | 1015 |
| |
984 | 1016 |
| |
| |||
1082 | 1114 |
| |
1083 | 1115 |
| |
1084 | 1116 |
| |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1085 | 1123 |
| |
1086 | 1124 |
| |
1087 | 1125 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
540 | 540 |
| |
541 | 541 |
| |
542 | 542 |
| |
| 543 | + | |
| 544 | + | |
543 | 545 |
| |
544 | 546 |
| |
545 | 547 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
972 | 972 |
| |
973 | 973 |
| |
974 | 974 |
| |
| 975 | + | |
975 | 976 |
| |
976 | 977 |
| |
977 | 978 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
861 | 861 |
| |
862 | 862 |
| |
863 | 863 |
| |
| 864 | + | |
864 | 865 |
| |
865 | 866 |
| |
866 | 867 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2231 | 2231 |
| |
2232 | 2232 |
| |
2233 | 2233 |
| |
| 2234 | + | |
2234 | 2235 |
| |
2235 | 2236 |
| |
2236 | 2237 |
| |
|
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 |
| - | |
| 283 | + | |
284 | 284 |
| |
285 | 285 |
| |
286 | 286 |
| |
| |||
1586 | 1586 |
| |
1587 | 1587 |
| |
1588 | 1588 |
| |
| 1589 | + | |
1589 | 1590 |
| |
1590 | 1591 |
| |
1591 | 1592 |
| |
| |||
1617 | 1618 |
| |
1618 | 1619 |
| |
1619 | 1620 |
| |
| 1621 | + | |
| 1622 | + | |
1620 | 1623 |
| |
1621 | 1624 |
| |
1622 |
| - | |
| 1625 | + | |
1623 | 1626 |
| |
1624 | 1627 |
| |
1625 | 1628 |
| |
| |||
6419 | 6422 |
| |
6420 | 6423 |
| |
6421 | 6424 |
| |
6422 |
| - | |
| 6425 | + | |
6423 | 6426 |
| |
6424 | 6427 |
| |
6425 | 6428 |
| |
| |||
6436 | 6439 |
| |
6437 | 6440 |
| |
6438 | 6441 |
| |
| 6442 | + | |
6439 | 6443 |
| |
6440 | 6444 |
| |
6441 | 6445 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| 155 | + | |
155 | 156 |
| |
156 | 157 |
| |
157 | 158 |
| |
| |||
5167 | 5168 |
| |
5168 | 5169 |
| |
5169 | 5170 |
| |
| 5171 | + | |
| 5172 | + | |
| 5173 | + | |
| 5174 | + | |
| 5175 | + | |
| 5176 | + | |
| 5177 | + | |
| 5178 | + | |
| 5179 | + | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
| 5184 | + | |
| 5185 | + | |
| 5186 | + | |
| 5187 | + | |
| 5188 | + | |
| 5189 | + | |
| 5190 | + | |
| 5191 | + | |
| 5192 | + | |
| 5193 | + | |
| 5194 | + | |
| 5195 | + | |
| 5196 | + | |
| 5197 | + | |
| 5198 | + | |
| 5199 | + | |
| 5200 | + |
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2112 | 2112 |
| |
2113 | 2113 |
| |
2114 | 2114 |
| |
| 2115 | + | |
| 2116 | + | |
2115 | 2117 |
| |
2116 | 2118 |
| |
2117 | 2119 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
801 | 801 |
| |
802 | 802 |
| |
803 | 803 |
| |
| 804 | + | |
804 | 805 |
| |
805 | 806 |
| |
806 | 807 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| 56 | + | |
| 57 | + | |
56 | 58 |
|
Lines changed: 39 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
199 | 238 |
| |
200 | 239 |
| |
201 | 240 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
103 | 103 |
| |
104 | 104 |
| |
105 | 105 |
| |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
106 | 126 |
| |
107 | 127 |
| |
108 | 128 |
| |
|
0 commit comments
Comments
(0)