forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit63110c6
committed
Use multi-inserts for pg_depend
This is a follow-up of the work done ine3931d0. This case is a bitdifferent than pg_attribute and pg_shdepend: the maximum number of itemsto insert is known in advance, but there is no need to handle pinneddependencies. Hence, the base allocation for slots is done based on thenumber of items and the maximum allowed with a cap at 64kB. Slots areinitialized once used to minimize the overhead of the operation.The insertions can be done for dependencies of the same type. Morecould be done by grouping the insertion of multiple dependency types ina single batch. This is left as future work.Some of the multi-insert logic is also simplified for pg_shdepend, asper the feedback discussed for this specific patch. This also moves toindexing.h the variable capping the maximum amount of data that can beused at once for a multi-insert, instead of having separate definitionsfor pg_attribute, pg_depend and pg_shdepend.Author: Daniel Gustafsson, Michael PaquierReviewed-by: Andres Freund, Álvaro HerreraDiscussion:https://postgr.es/m/20200807061619.GA23955@paquier.xyz1 parent4d41823 commit63110c6
File tree
4 files changed
+105
-65
lines changed- src
- backend/catalog
- include/catalog
4 files changed
+105
-65
lines changedLines changed: 1 addition & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
709 | 709 |
| |
710 | 710 |
| |
711 | 711 |
| |
712 |
| - | |
713 |
| - | |
714 |
| - | |
715 |
| - | |
716 |
| - | |
717 |
| - | |
718 | 712 |
| |
719 | 713 |
| |
720 | 714 |
| |
| |||
750 | 744 |
| |
751 | 745 |
| |
752 | 746 |
| |
753 |
| - | |
| 747 | + | |
754 | 748 |
| |
755 | 749 |
| |
756 | 750 |
| |
|
Lines changed: 66 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
| |||
76 | 77 |
| |
77 | 78 |
| |
78 | 79 |
| |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
79 | 88 |
| |
80 | 89 |
| |
81 | 90 |
| |
82 |
| - | |
83 |
| - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
84 | 95 |
| |
85 | 96 |
| |
86 | 97 |
| |
87 | 98 |
| |
88 | 99 |
| |
89 | 100 |
| |
90 | 101 |
| |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
| 102 | + | |
| 103 | + | |
104 | 104 |
| |
105 |
| - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
106 | 111 |
| |
107 |
| - | |
| 112 | + | |
108 | 113 |
| |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
109 | 135 |
| |
110 | 136 |
| |
111 | 137 |
| |
112 | 138 |
| |
113 |
| - | |
114 |
| - | |
115 |
| - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
116 | 142 |
| |
117 | 143 |
| |
118 | 144 |
| |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
119 | 156 |
| |
120 | 157 |
| |
121 | 158 |
| |
122 | 159 |
| |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
123 | 165 |
| |
124 | 166 |
| |
125 | 167 |
| |
|
Lines changed: 32 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
786 | 786 |
| |
787 | 787 |
| |
788 | 788 |
| |
789 |
| - | |
790 |
| - | |
791 |
| - | |
792 |
| - | |
793 |
| - | |
794 |
| - | |
795 | 789 |
| |
796 | 790 |
| |
797 | 791 |
| |
| |||
806 | 800 |
| |
807 | 801 |
| |
808 | 802 |
| |
809 |
| - | |
810 | 803 |
| |
811 | 804 |
| |
812 |
| - | |
813 |
| - | |
814 |
| - | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
815 | 808 |
| |
816 | 809 |
| |
817 | 810 |
| |
818 | 811 |
| |
819 | 812 |
| |
820 |
| - | |
821 |
| - | |
| 813 | + | |
| 814 | + | |
822 | 815 |
| |
823 |
| - | |
| 816 | + | |
824 | 817 |
| |
825 | 818 |
| |
826 | 819 |
| |
| |||
834 | 827 |
| |
835 | 828 |
| |
836 | 829 |
| |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
837 | 835 |
| |
838 | 836 |
| |
839 | 837 |
| |
840 | 838 |
| |
841 | 839 |
| |
842 | 840 |
| |
843 | 841 |
| |
844 |
| - | |
845 | 842 |
| |
846 | 843 |
| |
847 | 844 |
| |
848 | 845 |
| |
849 |
| - | |
850 |
| - | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
851 | 851 |
| |
852 |
| - | |
| 852 | + | |
853 | 853 |
| |
854 | 854 |
| |
855 | 855 |
| |
856 |
| - | |
857 |
| - | |
858 |
| - | |
859 |
| - | |
860 |
| - | |
861 |
| - | |
862 |
| - | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
863 | 863 |
| |
864 |
| - | |
865 |
| - | |
| 864 | + | |
| 865 | + | |
866 | 866 |
| |
867 | 867 |
| |
868 |
| - | |
| 868 | + | |
869 | 869 |
| |
870 |
| - | |
871 |
| - | |
872 |
| - | |
| 870 | + | |
| 871 | + | |
873 | 872 |
| |
874 | 873 |
| |
875 | 874 |
| |
876 | 875 |
| |
877 |
| - | |
878 |
| - | |
| 876 | + | |
| 877 | + | |
879 | 878 |
| |
880 | 879 |
| |
881 | 880 |
| |
882 | 881 |
| |
883 | 882 |
| |
884 | 883 |
| |
885 | 884 |
| |
886 |
| - | |
887 |
| - | |
| 885 | + | |
888 | 886 |
| |
889 | 887 |
| |
890 | 888 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 |
| |
33 | 39 |
| |
34 | 40 |
| |
|
0 commit comments
Comments
(0)