forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3c90dcd
committed
Fix calculation of relid sets for partitionwise child joins.
Applying add_outer_joins_to_relids() to a child join doesn't actuallywork, even if we've built a SpecialJoinInfo specialized to the child,because that function will also compare the join's relids to elementsof the main join_info_list, which only deal in regular relids notchild relids. This mistake escaped detection by the existingpartitionwise join tests because they didn't test any cases whereadd_outer_joins_to_relids() needs to add additional OJ relids (thatis, any cases where join reordering per identity 3 is possible).Instead, let's apply adjust_child_relids() to the relids of the parentjoin. This requires minor code reordering to collect the relevantAppendRelInfo structures first, but that's work we'd do shortly anyway.Report and fix by Richard Guo; cosmetic changes by meDiscussion:https://postgr.es/m/CAMbWs49NCNbyubZWgci3o=_OTY=snCfAPtMnM-32f3mm-K-Ckw@mail.gmail.com1 parent7c7412c commit3c90dcd
File tree
4 files changed
+75
-12
lines changed- src
- backend/optimizer
- path
- util
- test/regress
- expected
- sql
4 files changed
+75
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
1648 | 1643 | | |
1649 | | - | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1650 | 1652 | | |
1651 | 1653 | | |
1652 | 1654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
874 | 884 | | |
875 | | - | |
876 | | - | |
877 | | - | |
| 885 | + | |
| 886 | + | |
878 | 887 | | |
879 | 888 | | |
880 | 889 | | |
| |||
935 | 944 | | |
936 | 945 | | |
937 | 946 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | 947 | | |
942 | 948 | | |
943 | 949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
65 | 111 | | |
66 | 112 | | |
67 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
0 commit comments
Comments
(0)