- Notifications
You must be signed in to change notification settings - Fork5
Commit7c1719b
committed
Fix handling of data-modifying CTE subplans in EvalPlanQual.
We can't just skip initializing such subplans, because the referencing CTEnode will expect to find the subplan available when it initializes. Thatin turn means that ExecInitModifyTable must allow the case (which actuallyit needed to do anyway, since there's no guarantee that ModifyTable isexactly at the top of the CTE plan tree). So move the complaint about notbeing allowed in EvalPlanQual mode to execution instead of initialization.Testing turned up yet another problem, which is that we'd try tore-initialize the result relation's index list, leading to leaks anddangling pointers.Per report from Phil Sorber. Back-patch to 9.1 where data-modifying CTEswere introduced.1 parent672614c commit7c1719b
2 files changed
+19
-20
lines changedLines changed: 2 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2347 | 2347 |
| |
2348 | 2348 |
| |
2349 | 2349 |
| |
2350 |
| - | |
2351 |
| - | |
2352 |
| - | |
2353 |
| - | |
2354 |
| - | |
| 2350 | + | |
2355 | 2351 |
| |
2356 | 2352 |
| |
2357 | 2353 |
| |
2358 | 2354 |
| |
2359 | 2355 |
| |
2360 | 2356 |
| |
2361 | 2357 |
| |
2362 |
| - | |
2363 |
| - | |
2364 |
| - | |
2365 |
| - | |
2366 |
| - | |
2367 |
| - | |
| 2358 | + | |
2368 | 2359 |
| |
2369 | 2360 |
| |
2370 | 2361 |
| |
|
Lines changed: 17 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
715 | 715 |
| |
716 | 716 |
| |
717 | 717 |
| |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
718 | 730 |
| |
719 | 731 |
| |
720 | 732 |
| |
| |||
892 | 904 |
| |
893 | 905 |
| |
894 | 906 |
| |
895 |
| - | |
896 |
| - | |
897 |
| - | |
898 |
| - | |
899 |
| - | |
900 |
| - | |
901 |
| - | |
902 |
| - | |
903 | 907 |
| |
904 | 908 |
| |
905 | 909 |
| |
| |||
947 | 951 |
| |
948 | 952 |
| |
949 | 953 |
| |
| 954 | + | |
| 955 | + | |
| 956 | + | |
950 | 957 |
| |
951 | 958 |
| |
952 |
| - | |
| 959 | + | |
| 960 | + | |
953 | 961 |
| |
954 | 962 |
| |
955 | 963 |
| |
|
0 commit comments
Comments
(0)