forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb5c2cd5
Remove unnecessary checks for indexes for REPLICA IDENTITY FULL tables.
Previously, when selecting an usable index for update/delete for theREPLICA IDENTITY FULL table, in IsIndexOnlyExpression(), we used tocheck if all index fields are not expressions. However, it was notnecessary, because it is enough to check if only the leftmost indexfield is not an expression (and references the remote table column)and this check has already been done byRemoteRelContainsLeftMostColumnOnIdx().This commit removes IsIndexOnlyExpression() andRemoteRelContainsLeftMostColumnOnIdx() and all checks for usableindexes for REPLICA IDENTITY FULL tables are now performed byIsIndexUsableForReplicaIdentityFull().Backpatch this to remain the code consistent.Reported-by: Peter SmithReviewed-by: Amit Kapila, Önder KalacıDiscussion:https://postgr.es/m/CAHut%2BPsGRE5WSsY0jcLHJEoA17MrbP9yy8FxdjC_ZOAACxbt%2BQ%40mail.gmail.comBackpatch-through: 161 parentc895c4a commitb5c2cd5
File tree
4 files changed
+64
-89
lines changed- src
- backend
- executor
- replication/logical
- include/replication
4 files changed
+64
-89
lines changedLines changed: 0 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 | 225 |
| |
234 |
| - | |
235 | 226 |
| |
236 | 227 |
| |
237 | 228 |
| |
|
Lines changed: 44 additions & 74 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
734 | 734 |
| |
735 | 735 |
| |
736 | 736 |
| |
737 |
| - | |
738 |
| - | |
739 |
| - | |
740 |
| - | |
741 |
| - | |
742 |
| - | |
743 |
| - | |
744 |
| - | |
745 |
| - | |
746 |
| - | |
747 |
| - | |
748 |
| - | |
749 |
| - | |
750 |
| - | |
751 |
| - | |
752 |
| - | |
753 |
| - | |
754 |
| - | |
755 |
| - | |
756 |
| - | |
757 |
| - | |
758 |
| - | |
759 |
| - | |
760 |
| - | |
761 |
| - | |
762 |
| - | |
763 |
| - | |
764 |
| - | |
765 |
| - | |
766 |
| - | |
767 |
| - | |
768 |
| - | |
769 |
| - | |
770 |
| - | |
771 |
| - | |
772 |
| - | |
773 |
| - | |
774 |
| - | |
775 |
| - | |
776 |
| - | |
777 |
| - | |
778 |
| - | |
779 |
| - | |
780 |
| - | |
781 |
| - | |
782 |
| - | |
783 | 737 |
| |
784 | 738 |
| |
785 |
| - | |
786 |
| - | |
787 |
| - | |
788 |
| - | |
789 |
| - | |
790 |
| - | |
791 |
| - | |
792 |
| - | |
793 |
| - | |
794 |
| - | |
795 |
| - | |
796 |
| - | |
797 |
| - | |
798 |
| - | |
799 |
| - | |
800 |
| - | |
801 |
| - | |
| 739 | + | |
802 | 740 |
| |
803 | 741 |
| |
804 | 742 |
| |
| |||
815 | 753 |
| |
816 | 754 |
| |
817 | 755 |
| |
818 |
| - | |
819 | 756 |
| |
820 | 757 |
| |
821 | 758 |
| |
822 | 759 |
| |
823 | 760 |
| |
824 |
| - | |
825 |
| - | |
826 |
| - | |
| 761 | + | |
827 | 762 |
| |
828 | 763 |
| |
829 | 764 |
| |
830 |
| - | |
| 765 | + | |
831 | 766 |
| |
832 | 767 |
| |
833 | 768 |
| |
834 | 769 |
| |
835 | 770 |
| |
836 | 771 |
| |
837 | 772 |
| |
838 |
| - | |
839 |
| - | |
| 773 | + | |
840 | 774 |
| |
841 |
| - | |
842 |
| - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
843 | 791 |
| |
844 | 792 |
| |
845 | 793 |
| |
| |||
851 | 799 |
| |
852 | 800 |
| |
853 | 801 |
| |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
854 | 806 |
| |
855 | 807 |
| |
856 |
| - | |
| 808 | + | |
857 | 809 |
| |
| 810 | + | |
| 811 | + | |
858 | 812 |
| |
859 | 813 |
| |
860 | 814 |
| |
| 815 | + | |
| 816 | + | |
861 | 817 |
| |
862 | 818 |
| |
863 |
| - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
864 | 834 |
| |
865 | 835 |
| |
866 | 836 |
| |
|
Lines changed: 19 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
| 143 | + | |
143 | 144 |
| |
144 | 145 |
| |
145 | 146 |
| |
| |||
410 | 411 |
| |
411 | 412 |
| |
412 | 413 |
| |
413 |
| - | |
| 414 | + | |
414 | 415 |
| |
415 | 416 |
| |
416 | 417 |
| |
| |||
2663 | 2664 |
| |
2664 | 2665 |
| |
2665 | 2666 |
| |
2666 |
| - | |
| 2667 | + | |
2667 | 2668 |
| |
2668 | 2669 |
| |
2669 | 2670 |
| |
| |||
2816 | 2817 |
| |
2817 | 2818 |
| |
2818 | 2819 |
| |
2819 |
| - | |
| 2820 | + | |
2820 | 2821 |
| |
2821 | 2822 |
| |
2822 | 2823 |
| |
| |||
2855 | 2856 |
| |
2856 | 2857 |
| |
2857 | 2858 |
| |
2858 |
| - | |
| 2859 | + | |
2859 | 2860 |
| |
2860 | 2861 |
| |
2861 | 2862 |
| |
2862 | 2863 |
| |
2863 | 2864 |
| |
| 2865 | + | |
2864 | 2866 |
| |
2865 | 2867 |
| |
2866 | 2868 |
| |
| |||
2875 | 2877 |
| |
2876 | 2878 |
| |
2877 | 2879 |
| |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
2878 | 2891 |
| |
2879 | 2892 |
| |
2880 | 2893 |
| |
| 2894 | + | |
2881 | 2895 |
| |
2882 | 2896 |
| |
2883 | 2897 |
| |
| |||
2995 | 3009 |
| |
2996 | 3010 |
| |
2997 | 3011 |
| |
2998 |
| - | |
| 3012 | + | |
2999 | 3013 |
| |
3000 | 3014 |
| |
3001 | 3015 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
|
0 commit comments
Comments
(0)