forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcc2905e
committed
Use slots more widely in tuple mapping code and make naming more consistent.
It's inefficient to use a single slot for mapping between tupledescriptors for multiple tuples, as previously done when usingConvertPartitionTupleSlot(), as that means the slot's tuple descriptorschange for every tuple.Previously we also, via ConvertPartitionTupleSlot(), built new tuplesafter the mapping even in cases where we, immediately afterwards,access individual columns again.Refactor the code so one slot, on demand, is used for eachpartition. That avoids having to change the descriptor (and allows touse the more efficient "fixed" tuple slots). Then use slot->slotmapping, to avoid unnecessarily forming a tuple.As the naming between the tuple and slot mapping functions wasn'tconsistent, rename them to execute_attr_map_{tuple,slot}. It's likelythat we'll also rename convert_tuples_by_* to denote that thesefunctions "only" build a map, but that's left for later.Author: Amit Khandekar and Amit Langote, editorialized by meReviewed-By: Amit Langote, Amit Khandekar, Andres FreundDiscussion:https://postgr.es/m/CAJ3gD9fR0wRNeAE8VqffNTyONS_UfFPRpqxhnD9Q42vZB+Jvpg@mail.gmail.comhttps://postgr.es/m/e4f9d743-cd4b-efb0-7574-da21d86a7f36%40lab.ntt.co.jpBackpatch: -1 parent625b38e commitcc2905e
File tree
11 files changed
+272
-191
lines changed- src
- backend
- access/common
- commands
- executor
- include
- access
- executor
- pl/plpgsql/src
11 files changed
+272
-191
lines changedLines changed: 131 additions & 51 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
| 7 | + | |
| 8 | + | |
11 | 9 |
| |
12 | 10 |
| |
13 | 11 |
| |
| |||
22 | 20 |
| |
23 | 21 |
| |
24 | 22 |
| |
| 23 | + | |
25 | 24 |
| |
26 | 25 |
| |
27 | 26 |
| |
| |||
31 | 30 |
| |
32 | 31 |
| |
33 | 32 |
| |
34 |
| - | |
| 33 | + | |
35 | 34 |
| |
36 | 35 |
| |
37 | 36 |
| |
| |||
214 | 213 |
| |
215 | 214 |
| |
216 | 215 |
| |
217 |
| - | |
218 |
| - | |
219 | 216 |
| |
220 | 217 |
| |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
| 218 | + | |
261 | 219 |
| |
262 |
| - | |
| 220 | + | |
263 | 221 |
| |
264 |
| - | |
265 |
| - | |
| 222 | + | |
266 | 223 |
| |
267 | 224 |
| |
268 | 225 |
| |
| |||
367 | 324 |
| |
368 | 325 |
| |
369 | 326 |
| |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
370 | 394 |
| |
371 | 395 |
| |
372 | 396 |
| |
373 | 397 |
| |
374 |
| - | |
| 398 | + | |
375 | 399 |
| |
376 | 400 |
| |
377 | 401 |
| |
| |||
405 | 429 |
| |
406 | 430 |
| |
407 | 431 |
| |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
408 | 488 |
| |
409 | 489 |
| |
410 | 490 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1452 | 1452 |
| |
1453 | 1453 |
| |
1454 | 1454 |
| |
1455 |
| - | |
| 1455 | + | |
1456 | 1456 |
| |
1457 | 1457 |
| |
1458 | 1458 |
| |
|
Lines changed: 22 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
| |||
2691 | 2692 |
| |
2692 | 2693 |
| |
2693 | 2694 |
| |
| 2695 | + | |
2694 | 2696 |
| |
2695 | 2697 |
| |
2696 | 2698 |
| |
| |||
2862 | 2864 |
| |
2863 | 2865 |
| |
2864 | 2866 |
| |
2865 |
| - | |
2866 |
| - | |
| 2867 | + | |
2867 | 2868 |
| |
2868 |
| - | |
2869 |
| - | |
2870 |
| - | |
2871 |
| - | |
2872 |
| - | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
2873 | 2888 |
| |
2874 | 2889 |
| |
2875 | 2890 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5786 | 5786 |
| |
5787 | 5787 |
| |
5788 | 5788 |
| |
5789 |
| - | |
| 5789 | + | |
5790 | 5790 |
| |
5791 | 5791 |
| |
5792 | 5792 |
| |
| |||
5806 | 5806 |
| |
5807 | 5807 |
| |
5808 | 5808 |
| |
5809 |
| - | |
| 5809 | + | |
5810 | 5810 |
| |
5811 | 5811 |
| |
5812 | 5812 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3285 | 3285 |
| |
3286 | 3286 |
| |
3287 | 3287 |
| |
3288 |
| - | |
| 3288 | + | |
3289 | 3289 |
| |
3290 | 3290 |
| |
3291 | 3291 |
| |
|
0 commit comments
Comments
(0)