forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitaedd554
committed
Fix CatalogTupleInsert/Update abstraction for case of shared indstate.
Add CatalogTupleInsertWithInfo and CatalogTupleUpdateWithInfo to letcallers use the CatalogTupleXXX abstraction layer even in cases wherewe want to share the results of CatalogOpenIndexes across multipleinserts/updates for efficiency. This finishes the job begun in commit2f5c9d9, by allowing some remaining simple_heap_insert/updatecalls to be replaced. The abstraction layer is now complete enoughthat we don't have to export CatalogIndexInsert at all anymore.Also, this fixes several places in which2f5c9d9 introduced performanceregressions by using retail CatalogTupleInsert or CatalogTupleUpdate eventhough the previous coding had been able to amortize CatalogOpenIndexeswork across multiple tuples.A possible future improvement is to arrange for the indexing.c functionsto cache the CatalogIndexState somewhere, maybe in the relcache, in whichcase we could get rid of CatalogTupleInsertWithInfo andCatalogTupleUpdateWithInfo again. But that's a task for another day.Discussion:https://postgr.es/m/27502.1485981379@sss.pgh.pa.us1 parentab02896 commitaedd554
File tree
7 files changed
+84
-42
lines changed- src
- backend
- catalog
- commands
- storage/large_object
- include/catalog
7 files changed
+84
-42
lines changedLines changed: 6 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
586 | 586 |
| |
587 | 587 |
| |
588 | 588 |
| |
589 |
| - | |
590 |
| - | |
591 |
| - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
592 | 593 |
| |
593 | 594 |
| |
594 | 595 |
| |
| |||
630 | 631 |
| |
631 | 632 |
| |
632 | 633 |
| |
633 |
| - | |
634 |
| - | |
635 | 634 |
| |
636 |
| - | |
| 635 | + | |
637 | 636 |
| |
638 |
| - | |
639 |
| - | |
640 |
| - | |
641 |
| - | |
642 |
| - | |
643 |
| - | |
644 |
| - | |
| 637 | + | |
645 | 638 |
| |
646 | 639 |
| |
647 | 640 |
| |
|
Lines changed: 58 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
| 71 | + | |
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 |
| |
152 | 155 |
| |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
157 | 159 |
| |
158 | 160 |
| |
159 | 161 |
| |
160 | 162 |
| |
161 | 163 |
| |
162 |
| - | |
| 164 | + | |
163 | 165 |
| |
164 | 166 |
| |
165 | 167 |
| |
| |||
171 | 173 |
| |
172 | 174 |
| |
173 | 175 |
| |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
174 | 197 |
| |
175 | 198 |
| |
176 | 199 |
| |
| 200 | + | |
| 201 | + | |
177 | 202 |
| |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
182 | 207 |
| |
183 | 208 |
| |
184 | 209 |
| |
| |||
193 | 218 |
| |
194 | 219 |
| |
195 | 220 |
| |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
196 | 238 |
| |
197 | 239 |
| |
198 | 240 |
| |
199 |
| - | |
| 241 | + | |
200 | 242 |
| |
201 | 243 |
| |
202 | 244 |
| |
203 | 245 |
| |
204 | 246 |
| |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
205 | 252 |
| |
206 | 253 |
| |
207 | 254 |
| |
|
Lines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
111 |
| - | |
112 |
| - | |
| 110 | + | |
113 | 111 |
| |
114 | 112 |
| |
115 | 113 |
| |
116 |
| - | |
| 114 | + | |
117 | 115 |
| |
118 | 116 |
| |
119 | 117 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
753 | 753 |
| |
754 | 754 |
| |
755 | 755 |
| |
756 |
| - | |
| 756 | + | |
757 | 757 |
| |
758 | 758 |
| |
759 | 759 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1141 | 1141 |
| |
1142 | 1142 |
| |
1143 | 1143 |
| |
1144 |
| - | |
1145 | 1144 |
| |
1146 | 1145 |
| |
1147 | 1146 |
| |
| |||
1285 | 1284 |
| |
1286 | 1285 |
| |
1287 | 1286 |
| |
1288 |
| - | |
1289 |
| - | |
| 1287 | + | |
1290 | 1288 |
| |
1291 |
| - | |
1292 | 1289 |
| |
1293 |
| - | |
1294 |
| - | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
1295 | 1294 |
| |
1296 | 1295 |
| |
1297 | 1296 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
678 | 678 |
| |
679 | 679 |
| |
680 | 680 |
| |
681 |
| - | |
| 681 | + | |
| 682 | + | |
682 | 683 |
| |
683 | 684 |
| |
684 | 685 |
| |
| |||
720 | 721 |
| |
721 | 722 |
| |
722 | 723 |
| |
723 |
| - | |
| 724 | + | |
724 | 725 |
| |
725 | 726 |
| |
726 | 727 |
| |
| |||
848 | 849 |
| |
849 | 850 |
| |
850 | 851 |
| |
851 |
| - | |
| 852 | + | |
| 853 | + | |
852 | 854 |
| |
853 | 855 |
| |
854 | 856 |
| |
| |||
885 | 887 |
| |
886 | 888 |
| |
887 | 889 |
| |
888 |
| - | |
| 890 | + | |
889 | 891 |
| |
890 | 892 |
| |
891 | 893 |
| |
|
Lines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
34 |
| - | |
35 |
| - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 |
| |
39 | 42 |
| |
40 | 43 |
| |
|
0 commit comments
Comments
(0)