forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit64ad858
committed
Change more places to be less trusting of RestrictInfo.is_pushed_down.
On further reflection, commite5d8399 didn't go far enough: pretty mucheverywhere in the planner that examines a clause's is_pushed_down flagought to be changed to use the more complicated behavior where we alsocheck the clause's required_relids. Otherwise we could make incorrectdecisions about whether, say, a clause is safe to use as a hash clause.Some (many?) of these places are safe as-is, either because they arenever reached while considering a parameterized path, or because thereare additional checks that would reject a pushed-down clause anyway.However, it seems smarter to just code them all the same way ratherthan rely on easily-broken reasoning of that sort.In support of that, invent a new macro RINFO_IS_PUSHED_DOWN that shouldbe used in place of direct tests on the is_pushed_down flag.Like the previous patch, back-patch to all supported branches.Discussion:https://postgr.es/m/f8128b11-c5bf-3539-48cd-234178b2314d@proxel.se1 parent306d6e5 commit64ad858
File tree
7 files changed
+52
-32
lines changed- src
- backend/optimizer
- path
- plan
- util
- include/nodes
7 files changed
+52
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
3542 | 3543 | | |
3543 | 3544 | | |
3544 | 3545 | | |
| 3546 | + | |
| 3547 | + | |
3545 | 3548 | | |
3546 | 3549 | | |
3547 | 3550 | | |
3548 | 3551 | | |
3549 | 3552 | | |
3550 | 3553 | | |
3551 | | - | |
| 3554 | + | |
3552 | 3555 | | |
3553 | 3556 | | |
3554 | 3557 | | |
| |||
3863 | 3866 | | |
3864 | 3867 | | |
3865 | 3868 | | |
| 3869 | + | |
3866 | 3870 | | |
3867 | 3871 | | |
3868 | 3872 | | |
| |||
3905 | 3909 | | |
3906 | 3910 | | |
3907 | 3911 | | |
| 3912 | + | |
3908 | 3913 | | |
3909 | 3914 | | |
3910 | 3915 | | |
| |||
3928 | 3933 | | |
3929 | 3934 | | |
3930 | 3935 | | |
| 3936 | + | |
3931 | 3937 | | |
3932 | 3938 | | |
3933 | 3939 | | |
| |||
3981 | 3987 | | |
3982 | 3988 | | |
3983 | 3989 | | |
3984 | | - | |
| 3990 | + | |
3985 | 3991 | | |
3986 | 3992 | | |
3987 | 3993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
1311 | | - | |
| 1311 | + | |
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
| |||
1547 | 1547 | | |
1548 | 1548 | | |
1549 | 1549 | | |
1550 | | - | |
| 1550 | + | |
1551 | 1551 | | |
1552 | 1552 | | |
1553 | 1553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
746 | 747 | | |
747 | 748 | | |
748 | 749 | | |
749 | | - | |
| 750 | + | |
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
| |||
760 | 761 | | |
761 | 762 | | |
762 | 763 | | |
763 | | - | |
| 764 | + | |
764 | 765 | | |
765 | 766 | | |
766 | 767 | | |
767 | 768 | | |
768 | | - | |
| 769 | + | |
769 | 770 | | |
770 | 771 | | |
771 | 772 | | |
| |||
777 | 778 | | |
778 | 779 | | |
779 | 780 | | |
780 | | - | |
| 781 | + | |
781 | 782 | | |
782 | 783 | | |
783 | 784 | | |
| |||
813 | 814 | | |
814 | 815 | | |
815 | 816 | | |
816 | | - | |
| 817 | + | |
817 | 818 | | |
818 | 819 | | |
819 | 820 | | |
| |||
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
839 | | - | |
| 840 | + | |
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
| |||
851 | 852 | | |
852 | 853 | | |
853 | 854 | | |
854 | | - | |
| 855 | + | |
855 | 856 | | |
856 | 857 | | |
857 | 858 | | |
858 | 859 | | |
859 | | - | |
| 860 | + | |
860 | 861 | | |
861 | 862 | | |
862 | 863 | | |
| |||
1207 | 1208 | | |
1208 | 1209 | | |
1209 | 1210 | | |
1210 | | - | |
| 1211 | + | |
1211 | 1212 | | |
1212 | | - | |
| 1213 | + | |
1213 | 1214 | | |
1214 | 1215 | | |
1215 | 1216 | | |
1216 | 1217 | | |
1217 | 1218 | | |
1218 | | - | |
| 1219 | + | |
| 1220 | + | |
1219 | 1221 | | |
1220 | 1222 | | |
1221 | | - | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1222 | 1226 | | |
1223 | 1227 | | |
1224 | 1228 | | |
| |||
1233 | 1237 | | |
1234 | 1238 | | |
1235 | 1239 | | |
1236 | | - | |
| 1240 | + | |
1237 | 1241 | | |
1238 | 1242 | | |
1239 | 1243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
| 251 | + | |
253 | 252 | | |
254 | 253 | | |
255 | 254 | | |
| |||
417 | 416 | | |
418 | 417 | | |
419 | 418 | | |
420 | | - | |
421 | | - | |
| 419 | + | |
422 | 420 | | |
423 | 421 | | |
424 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1676 | 1676 | | |
1677 | 1677 | | |
1678 | 1678 | | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
1679 | 1684 | | |
1680 | 1685 | | |
1681 | 1686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
| 436 | + | |
445 | 437 | | |
446 | 438 | | |
447 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
| 1541 | + | |
1541 | 1542 | | |
1542 | 1543 | | |
1543 | 1544 | | |
| |||
1664 | 1665 | | |
1665 | 1666 | | |
1666 | 1667 | | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
1667 | 1682 | | |
1668 | 1683 | | |
1669 | 1684 | | |
| |||
0 commit comments
Comments
(0)