- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit58ea074
Richard Guo
Fix semijoin unique-ification for child relations
For a child relation, we should not assume that its parent'sunique-ified relation (or unique-ified path in v18) always exists. Incases where all RHS columns that need to be unique-ified are equatedto constants, the unique-ified relation/path for the parent table isnot built, as there are no columns left to unique-ify. Failing toaccount for this can result in a SIGSEGV crash during planning.This patch checks whether the parent's unique-ified relation or pathexists and skips unique-ification of the child relation if it doesnot.Author: Richard Guo <guofenglinux@gmail.com>Discussion:https://postgr.es/m/CAMbWs49MOdLW2c+qbLHHBt8VBu=4ONpM91D19=AWeW93eFUF6A@mail.gmail.comBackpatch-through: 181 parent5146886 commit58ea074
File tree
3 files changed
+106
-0
lines changed- src
- backend/optimizer/util
- test/regress
- expected
- sql
3 files changed
+106
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1753 | 1753 | | |
1754 | 1754 | | |
1755 | 1755 | | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
1756 | 1765 | | |
1757 | 1766 | | |
1758 | 1767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6580 | 6580 | | |
6581 | 6581 | | |
6582 | 6582 | | |
| 6583 | + | |
| 6584 | + | |
| 6585 | + | |
| 6586 | + | |
| 6587 | + | |
| 6588 | + | |
| 6589 | + | |
| 6590 | + | |
| 6591 | + | |
| 6592 | + | |
| 6593 | + | |
| 6594 | + | |
| 6595 | + | |
| 6596 | + | |
| 6597 | + | |
| 6598 | + | |
| 6599 | + | |
| 6600 | + | |
| 6601 | + | |
| 6602 | + | |
| 6603 | + | |
| 6604 | + | |
| 6605 | + | |
| 6606 | + | |
| 6607 | + | |
| 6608 | + | |
| 6609 | + | |
| 6610 | + | |
| 6611 | + | |
| 6612 | + | |
| 6613 | + | |
| 6614 | + | |
| 6615 | + | |
| 6616 | + | |
| 6617 | + | |
| 6618 | + | |
| 6619 | + | |
| 6620 | + | |
| 6621 | + | |
| 6622 | + | |
| 6623 | + | |
| 6624 | + | |
| 6625 | + | |
| 6626 | + | |
| 6627 | + | |
| 6628 | + | |
| 6629 | + | |
| 6630 | + | |
| 6631 | + | |
| 6632 | + | |
| 6633 | + | |
| 6634 | + | |
| 6635 | + | |
| 6636 | + | |
| 6637 | + | |
| 6638 | + | |
| 6639 | + | |
| 6640 | + | |
| 6641 | + | |
| 6642 | + | |
6583 | 6643 | | |
6584 | 6644 | | |
6585 | 6645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2453 | 2453 | | |
2454 | 2454 | | |
2455 | 2455 | | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
2456 | 2493 | | |
2457 | 2494 | | |
2458 | 2495 | | |
| |||
0 commit comments
Comments
(0)