forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4d94b5f
committed
Make real sure we don't reassociate joins into or out of SEMI/ANTI joins.
Per the discussion in optimizer/README, it's unsafe to reassociate anythinginto or out of the RHS of a SEMI or ANTI join. An example from PiotrStefaniak showed that join_is_legal() wasn't sufficiently enforcing thisrule, so lock it down a little harder.I couldn't find a reasonably simple example of the optimizer trying todo this, so no new regression test. (Piotr's example involved the randomsearch in GEQO accidentally trying an invalid case and triggering a sanitycheck way downstream in clause selectivity estimation, which did not seemlike a sequence of events that would be useful to memorialize in aregression test as-is.)Back-patch to all active branches.1 parentaa9f8cb commit4d94b5f
1 file changed
+9
-6
lines changedLines changed: 9 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
473 |
| - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
474 | 476 |
| |
475 |
| - | |
476 |
| - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
477 | 481 |
| |
478 | 482 |
| |
479 | 483 |
| |
| |||
498 | 502 |
| |
499 | 503 |
| |
500 | 504 |
| |
501 |
| - | |
502 |
| - | |
| 505 | + | |
503 | 506 |
| |
504 | 507 |
| |
505 | 508 |
| |
506 | 509 |
| |
507 | 510 |
| |
508 | 511 |
| |
509 |
| - | |
| 512 | + | |
510 | 513 |
| |
511 | 514 |
| |
512 | 515 |
| |
|
0 commit comments
Comments
(0)