- Notifications
You must be signed in to change notification settings - Fork5
Commit5043193
committed
Allow FDWs to push down quals without breaking EvalPlanQual rechecks.
This fixes a long-standing bug which was discovered while investigatingthe interaction between the new join pushdown code and the EvalPlanQualmachinery: if a ForeignScan appears on the inner side of a paramaterizednestloop, an EPQ recheck would re-return the original tuple even ifit no longer satisfied the pushed-down quals due to changed parametervalues.This fix adds a new member to ForeignScan and ForeignScanState and anew argument to make_foreignscan, and requires changes to FDWs whichpush down quals to populate that new argument with a list of quals theyhave chosen to push down. Therefore, I'm only back-patching to 9.5,even though the bug is not new in 9.5.Etsuro Fujita, reviewed by me and by Kyotaro Horiguchi.1 parent54e07be commit5043193
File tree
12 files changed
+70
-13
lines changed- contrib
- file_fdw
- postgres_fdw
- doc/src/sgml
- src
- backend
- executor
- nodes
- optimizer/plan
- include
- nodes
- optimizer
12 files changed
+70
-13
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
563 | 563 |
| |
564 | 564 |
| |
565 | 565 |
| |
566 |
| - | |
| 566 | + | |
| 567 | + | |
567 | 568 |
| |
568 | 569 |
| |
569 | 570 |
| |
|
Lines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
748 | 748 |
| |
749 | 749 |
| |
750 | 750 |
| |
| 751 | + | |
751 | 752 |
| |
752 | 753 |
| |
753 | 754 |
| |
| |||
769 | 770 |
| |
770 | 771 |
| |
771 | 772 |
| |
772 |
| - | |
773 |
| - | |
| 773 | + | |
| 774 | + | |
774 | 775 |
| |
775 | 776 |
| |
776 | 777 |
| |
| |||
784 | 785 |
| |
785 | 786 |
| |
786 | 787 |
| |
| 788 | + | |
787 | 789 |
| |
| 790 | + | |
| 791 | + | |
788 | 792 |
| |
789 | 793 |
| |
790 | 794 |
| |
| 795 | + | |
791 | 796 |
| |
| 797 | + | |
| 798 | + | |
792 | 799 |
| |
793 | 800 |
| |
794 | 801 |
| |
| |||
874 | 881 |
| |
875 | 882 |
| |
876 | 883 |
| |
877 |
| - | |
| 884 | + | |
| 885 | + | |
878 | 886 |
| |
879 | 887 |
| |
880 | 888 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1135 | 1135 |
| |
1136 | 1136 |
| |
1137 | 1137 |
| |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1138 | 1147 |
| |
1139 | 1148 |
| |
1140 | 1149 |
| |
|
Lines changed: 17 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
75 |
| - | |
76 |
| - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
77 | 89 |
| |
78 | 90 |
| |
79 | 91 |
| |
| |||
135 | 147 |
| |
136 | 148 |
| |
137 | 149 |
| |
| 150 | + | |
| 151 | + | |
| 152 | + | |
138 | 153 |
| |
139 | 154 |
| |
140 | 155 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
624 | 624 |
| |
625 | 625 |
| |
626 | 626 |
| |
| 627 | + | |
627 | 628 |
| |
628 | 629 |
| |
629 | 630 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
579 | 579 |
| |
580 | 580 |
| |
581 | 581 |
| |
| 582 | + | |
582 | 583 |
| |
583 | 584 |
| |
584 | 585 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2117 | 2117 |
| |
2118 | 2118 |
| |
2119 | 2119 |
| |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
2120 | 2123 |
| |
2121 | 2124 |
| |
2122 | 2125 |
| |
| |||
3702 | 3705 |
| |
3703 | 3706 |
| |
3704 | 3707 |
| |
3705 |
| - | |
| 3708 | + | |
| 3709 | + | |
3706 | 3710 |
| |
3707 | 3711 |
| |
3708 | 3712 |
| |
| |||
3718 | 3722 |
| |
3719 | 3723 |
| |
3720 | 3724 |
| |
| 3725 | + | |
3721 | 3726 |
| |
3722 | 3727 |
| |
3723 | 3728 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1127 | 1127 |
| |
1128 | 1128 |
| |
1129 | 1129 |
| |
1130 |
| - | |
| 1130 | + | |
1131 | 1131 |
| |
1132 | 1132 |
| |
1133 | 1133 |
| |
1134 | 1134 |
| |
1135 | 1135 |
| |
1136 | 1136 |
| |
| 1137 | + | |
| 1138 | + | |
1137 | 1139 |
| |
1138 | 1140 |
| |
1139 | 1141 |
| |
|
Lines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2371 | 2371 |
| |
2372 | 2372 |
| |
2373 | 2373 |
| |
2374 |
| - | |
2375 |
| - | |
2376 |
| - | |
2377 |
| - | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
2378 | 2386 |
| |
2379 | 2387 |
| |
2380 | 2388 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1580 | 1580 |
| |
1581 | 1581 |
| |
1582 | 1582 |
| |
| 1583 | + | |
1583 | 1584 |
| |
1584 | 1585 |
| |
1585 | 1586 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
509 | 509 |
| |
510 | 510 |
| |
511 | 511 |
| |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
512 | 517 |
| |
513 | 518 |
| |
514 | 519 |
| |
| |||
521 | 526 |
| |
522 | 527 |
| |
523 | 528 |
| |
| 529 | + | |
524 | 530 |
| |
525 | 531 |
| |
526 | 532 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
| 48 | + | |
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
|
0 commit comments
Comments
(0)