forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1746ba9
committed
Improve check_partial_indexes() to consider join clauses in proof attempts.
Traditionally check_partial_indexes() has only looked at restrictionclauses while trying to prove partial indexes usable in queries. However,join clauses can also be used in some cases; mainly, that a strict operatoron "x" proves an "x IS NOT NULL" index predicate, even if the operator isin a join clause rather than a restriction clause. Adding this code fixesa regression in 9.2, because previously we would take join clauses intoaccount when considering whether a partial index could be used in anestloop inner indexscan path. 9.2 doesn't handle nestloop innerindexscans in the same way, and this consideration was overlooked in therewrite. Moving the work to check_partial_indexes() is a better solutionanyway, since the proof applies whether or not we actually use the indexin that particular way, and we don't have to do it over again for eachpossible outer relation. Per report from Dave Cramer.1 parent817c186 commit1746ba9
1 file changed
+76
-6
lines changedLines changed: 76 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2589 | 2589 |
| |
2590 | 2590 |
| |
2591 | 2591 |
| |
2592 |
| - | |
2593 |
| - | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
2594 | 2596 |
| |
2595 |
| - | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
2596 | 2603 |
| |
2597 |
| - | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
2598 | 2669 |
| |
2599 | 2670 |
| |
2600 | 2671 |
| |
2601 | 2672 |
| |
2602 | 2673 |
| |
2603 | 2674 |
| |
2604 | 2675 |
| |
2605 |
| - | |
2606 |
| - | |
| 2676 | + | |
2607 | 2677 |
| |
2608 | 2678 |
| |
2609 | 2679 |
| |
|
0 commit comments
Comments
(0)