- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit807a40c
committed
Fix planning of btree index scans using ScalarArrayOpExpr quals.
In commit9e8da0f, I improved btreeto handle ScalarArrayOpExpr quals natively, so that constructs like"indexedcol IN (list)" could be supported by index-only scans. Usingsuch a qual results in multiple scans of the index, under-the-hood.I went to some lengths to ensure that this still produces rows in indexorder ... but I failed to recognize that if a higher-order index columnis lacking an equality constraint, rescans can produce out-of-orderdata from that column. Tweak the planner to not expect sorted outputin that case. Per trouble report from Robert McGehee.1 parent3f828fa commit807a40c
File tree
3 files changed
+83
-1
lines changed- src
- backend/optimizer/path
- test/regress
- expected
- sql
3 files changed
+83
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
| 790 | + | |
790 | 791 | | |
791 | 792 | | |
792 | 793 | | |
| |||
824 | 825 | | |
825 | 826 | | |
826 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
827 | 835 | | |
828 | 836 | | |
829 | 837 | | |
830 | 838 | | |
831 | 839 | | |
832 | 840 | | |
833 | 841 | | |
| 842 | + | |
834 | 843 | | |
835 | 844 | | |
836 | 845 | | |
| |||
846 | 855 | | |
847 | 856 | | |
848 | 857 | | |
| 858 | + | |
| 859 | + | |
849 | 860 | | |
850 | 861 | | |
851 | 862 | | |
| |||
882 | 893 | | |
883 | 894 | | |
884 | 895 | | |
885 | | - | |
| 896 | + | |
| 897 | + | |
886 | 898 | | |
887 | 899 | | |
| 900 | + | |
888 | 901 | | |
889 | 902 | | |
890 | 903 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2676 | 2676 | | |
2677 | 2677 | | |
2678 | 2678 | | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
0 commit comments
Comments
(0)