forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7371ab7
committed
Further mucking with PlaceHolderVar-related restrictions on join order.
Commit85e5e22 turns out not to have takencare of all cases of the partially-evaluatable-PlaceHolderVar problem foundby Andreas Seltenreich's fuzz testing. I had set it up to check for riskyPHVs only in the event that we were making a star-schema-based exception tothe param_source_rels join ordering heuristic. However, it turns out thatthe problem can occur even in joins that satisfy the param_source_relsheuristic, in which case allow_star_schema_join() isn't consulted.Refactor so that we check for risky PHVs whenever the proposed join hasany remaining parameterization.Back-patch to 9.2, like the previous patch (except for the regression testcase, which only works back to 9.3 because it uses LATERAL).Note that this discovery implies that problems of this sort could'veoccurred in 9.2 and up even before the star-schema patch; though I've nottried to prove that experimentally.1 parentd4ad167 commit7371ab7
File tree
3 files changed
+79
-28
lines changed- src
- backend/optimizer/path
- test/regress
- expected
- sql
3 files changed
+79
-28
lines changedLines changed: 41 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 | 277 |
| |
295 | 278 |
| |
296 | 279 |
| |
297 |
| - | |
| 280 | + | |
298 | 281 |
| |
299 | 282 |
| |
300 | 283 |
| |
301 | 284 |
| |
302 | 285 |
| |
303 | 286 |
| |
304 |
| - | |
305 | 287 |
| |
306 | 288 |
| |
307 |
| - | |
308 |
| - | |
| 289 | + | |
| 290 | + | |
309 | 291 |
| |
310 |
| - | |
311 |
| - | |
312 |
| - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
313 | 325 |
| |
314 |
| - | |
315 | 326 |
| |
316 | 327 |
| |
317 | 328 |
| |
| |||
354 | 365 |
| |
355 | 366 |
| |
356 | 367 |
| |
357 |
| - | |
| 368 | + | |
| 369 | + | |
358 | 370 |
| |
359 | 371 |
| |
360 | 372 |
| |
361 | 373 |
| |
362 |
| - | |
363 |
| - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
364 | 377 |
| |
365 | 378 |
| |
366 | 379 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2960 | 2960 |
| |
2961 | 2961 |
| |
2962 | 2962 |
| |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
2963 | 2983 |
| |
2964 | 2984 |
| |
2965 | 2985 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
858 | 858 |
| |
859 | 859 |
| |
860 | 860 |
| |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
861 | 879 |
| |
862 | 880 |
| |
863 | 881 |
| |
|
0 commit comments
Comments
(0)