forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf862d57

Etsuro Fujita
Further fix for EvalPlanQual with mix of local and foreign partitions.
We assume that direct-modify ForeignScan nodes cannot be re-evaluatedduring EvalPlanQual processing, but the rework for inheritedUPDATE/DELETE in commit86dc900 changed things, without consideringthat, so that such ForeignScan nodes get called as part of theEvalPlanQual subtree during EvalPlanQual processing in the case of aninherited UPDATE/DELETE where the inheritance set contains foreigntarget relations. To avoid re-evaluating such ForeignScan nodes duringEvalPlanQual processing, commitc3928b4 modified nodeForeignscan.c,but the assumption made there that ExecForeignScan() should never becalled for such ForeignScan nodes during EvalPlanQual processing turnedout to be wrong in some cases, leading to a segmentation fault or a"cannot re-evaluate a Foreign Update or Delete during EvalPlanQual"error.Fix by modifying nodeForeignscan.c further to avoid re-evaluating suchForeignScan nodes even in ExecForeignScan()/ExecReScanForeignScan()during EvalPlanQual processing. Since this makes non-reachable thetest-and-elog added to ForeignNext() by commitc3928b4 that producedthe aforesaid error, convert the test-and-elog to an Assert.Per bug #17355 from Alexander Lakhin. Back-patch to v14 where bothcommits came in.Patch by me, reviewed and tested by Alexander Lakhin and Amit Langote.Discussion:https://postgr.es/m/17355-de8e362eb7001a96@postgresql.org1 parent4b0e37f commitf862d57
1 file changed
+25
-5
lines changedLines changed: 25 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 |
| - | |
59 |
| - | |
| 58 | + | |
60 | 59 |
| |
61 | 60 |
| |
62 | 61 |
| |
| |||
121 | 120 |
| |
122 | 121 |
| |
123 | 122 |
| |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
124 | 132 |
| |
125 | 133 |
| |
126 | 134 |
| |
| |||
265 | 273 |
| |
266 | 274 |
| |
267 | 275 |
| |
268 |
| - | |
269 |
| - | |
270 |
| - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
271 | 282 |
| |
272 | 283 |
| |
273 | 284 |
| |
| |||
321 | 332 |
| |
322 | 333 |
| |
323 | 334 |
| |
| 335 | + | |
| 336 | + | |
324 | 337 |
| |
325 | 338 |
| |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
326 | 346 |
| |
327 | 347 |
| |
328 | 348 |
| |
|
0 commit comments
Comments
(0)