- Notifications
You must be signed in to change notification settings - Fork5
Commit88e902b
committed
Simplify handling of remote-qual pass-forward in postgres_fdw.
Commit0bf3ae8 encountered a need to pass the finally chosen remote qualconditions forward from postgresGetForeignPlan to postgresPlanDirectModify.It solved that by sticking them into the plan node's fdw_private list,which in hindsight was a pretty bad idea. In the first place, there's nouse for those qual trees either in EXPLAIN or execution; indeed they couldnever safely be used for any post-planning purposes, because they would notget processed by setrefs.c. So they're just dead weight to carry around inthe finished plan tree, plus being an attractive nuisance for somebody whomight get the idea that they could be used that way. Secondly, becausethose qual trees (sometimes) contained RestrictInfos, they created aplan-transmission hazard for parallel query, which is how come we noticed aproblem. We dealt with that symptom in commit28b0478, but really a morestraightforward and more efficient fix is to pass the data through in a newfield of struct PgFdwRelationInfo. So do it that way. (There's no needto revert28b0478, as it has sufficient reason to live anyway.)Per fuzz testing by Andreas Seltenreich.Discussion:https://postgr.es/m/87tw5x4vcu.fsf@credativ.de1 parent02af785 commit88e902b
2 files changed
+29
-24
lines changedLines changed: 21 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 | 67 |
| |
71 | 68 |
| |
72 | 69 |
| |
| |||
1262 | 1259 |
| |
1263 | 1260 |
| |
1264 | 1261 |
| |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1265 | 1265 |
| |
1266 | 1266 |
| |
1267 | 1267 |
| |
1268 | 1268 |
| |
1269 |
| - | |
1270 |
| - | |
| 1269 | + | |
1271 | 1270 |
| |
1272 | 1271 |
| |
1273 | 1272 |
| |
| |||
1280 | 1279 |
| |
1281 | 1280 |
| |
1282 | 1281 |
| |
1283 |
| - | |
1284 |
| - | |
1285 |
| - | |
1286 |
| - | |
1287 |
| - | |
1288 |
| - | |
1289 |
| - | |
1290 | 1282 |
| |
1291 | 1283 |
| |
1292 | 1284 |
| |
| |||
2130 | 2122 |
| |
2131 | 2123 |
| |
2132 | 2124 |
| |
2133 |
| - | |
2134 |
| - | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
2135 | 2129 |
| |
2136 | 2130 |
| |
2137 | 2131 |
| |
2138 | 2132 |
| |
2139 |
| - | |
| 2133 | + | |
2140 | 2134 |
| |
2141 | 2135 |
| |
2142 | 2136 |
| |
| |||
2155 | 2149 |
| |
2156 | 2150 |
| |
2157 | 2151 |
| |
| 2152 | + | |
2158 | 2153 |
| |
2159 | 2154 |
| |
| 2155 | + | |
2160 | 2156 |
| |
2161 | 2157 |
| |
2162 | 2158 |
| |
| |||
2168 | 2164 |
| |
2169 | 2165 |
| |
2170 | 2166 |
| |
2171 |
| - | |
2172 | 2167 |
| |
2173 | 2168 |
| |
2174 | 2169 |
| |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
2175 | 2175 |
| |
2176 | 2176 |
| |
2177 | 2177 |
| |
2178 | 2178 |
| |
2179 | 2179 |
| |
2180 | 2180 |
| |
2181 |
| - | |
2182 | 2181 |
| |
2183 | 2182 |
| |
2184 | 2183 |
| |
| |||
2201 | 2200 |
| |
2202 | 2201 |
| |
2203 | 2202 |
| |
2204 |
| - | |
| 2203 | + | |
2205 | 2204 |
| |
2206 | 2205 |
| |
2207 | 2206 |
| |
| |||
2220 | 2219 |
| |
2221 | 2220 |
| |
2222 | 2221 |
| |
2223 |
| - | |
| 2222 | + | |
2224 | 2223 |
| |
2225 | 2224 |
| |
2226 | 2225 |
| |
2227 |
| - | |
2228 |
| - | |
| 2226 | + | |
2229 | 2227 |
| |
2230 | 2228 |
| |
2231 | 2229 |
| |
| |||
2242 | 2240 |
| |
2243 | 2241 |
| |
2244 | 2242 |
| |
2245 |
| - | |
| 2243 | + | |
2246 | 2244 |
| |
2247 | 2245 |
| |
2248 | 2246 |
| |
2249 | 2247 |
| |
2250 |
| - | |
| 2248 | + | |
2251 | 2249 |
| |
2252 | 2250 |
| |
2253 | 2251 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 |
| |
27 | 30 |
| |
28 | 31 |
| |
| |||
40 | 43 |
| |
41 | 44 |
| |
42 | 45 |
| |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 |
| |
44 | 50 |
| |
45 | 51 |
| |
| |||
83 | 89 |
| |
84 | 90 |
| |
85 | 91 |
| |
| 92 | + | |
86 | 93 |
| |
87 | 94 |
| |
88 | 95 |
| |
|
0 commit comments
Comments
(0)