forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1a0586d
committed
Introduce notion of different types of slots (without implementing them).
Upcoming work intends to allow pluggable ways to introduce new ways ofstoring table data. Accessing those table access methods from theexecutor requires TupleTableSlots to be carry tuples in the nativeformat of such storage methods; otherwise there'll be a significantconversion overhead.Different access methods will require different data to store tuplesefficiently (just like virtual, minimal, heap already require fieldsin TupleTableSlot). To allow that without requiring additional pointerindirections, we want to have different structs (embeddingTupleTableSlot) for different types of slots. Thus different types ofslots are needed, which requires adapting creators of slots.The slot that most efficiently can represent a type of tuple in anexecutor node will often depend on the type of slot a child nodeuses. Therefore we need to track the type of slot is returned bynodes, so parent slots can create slots based on that.Relatedly, JIT compilation of tuple deforming needs to know which typeof slot a certain expression refers to, so it can create anappropriate deforming function for the type of tuple in the slot.But not all nodes will only return one type of slot, e.g. an appendnode will potentially return different types of slots for each of itssubplans.Therefore add function that allows to query the type of a node'sresult slot, and whether it'll always be the same type (whether it'sfixed). This can be queried using ExecGetResultSlotOps().The scan, result, inner, outer type of slots are automaticallyinferred from ExecInitScanTupleSlot(), ExecInitResultSlot(),left/right subtrees respectively. If that's not correct for a node,that can be overwritten using new fields in PlanState.This commit does not introduce the actually abstracted implementationof different kind of TupleTableSlots, that will be left for a followupcommit. The different types of slots introduced will, for now, stilluse the same backing implementation.While this already partially invalidates the big comment intuptable.h, it seems to make more sense to update it later, when thedifferent TupleTableSlot implementations actually exist.Author: Ashutosh Bapat and Andres Freund, with changes by Amit KhandekarDiscussion:https://postgr.es/m/20181105210039.hh4vvi4vwoq5ba2q@alap3.anarazel.de1 parent763f2ed commit1a0586d
File tree
69 files changed
+478
-176
lines changed- src
- backend
- access/heap
- catalog
- commands
- executor
- partitioning
- replication
- logical
- tcop
- utils
- adt
- misc
- sort
- include
- executor
- nodes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+478
-176
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4503 | 4503 |
| |
4504 | 4504 |
| |
4505 | 4505 |
| |
4506 |
| - | |
| 4506 | + | |
| 4507 | + | |
4507 | 4508 |
| |
4508 | 4509 |
| |
4509 | 4510 |
| |
|
Lines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2510 | 2510 |
| |
2511 | 2511 |
| |
2512 | 2512 |
| |
2513 |
| - | |
| 2513 | + | |
| 2514 | + | |
2514 | 2515 |
| |
2515 | 2516 |
| |
2516 | 2517 |
| |
| |||
2997 | 2998 |
| |
2998 | 2999 |
| |
2999 | 3000 |
| |
3000 |
| - | |
| 3001 | + | |
| 3002 | + | |
3001 | 3003 |
| |
3002 | 3004 |
| |
3003 | 3005 |
| |
| |||
3315 | 3317 |
| |
3316 | 3318 |
| |
3317 | 3319 |
| |
3318 |
| - | |
| 3320 | + | |
| 3321 | + | |
3319 | 3322 |
| |
3320 | 3323 |
| |
3321 | 3324 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
98 |
| - | |
| 98 | + | |
| 99 | + | |
99 | 100 |
| |
100 | 101 |
| |
101 | 102 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
730 | 730 |
| |
731 | 731 |
| |
732 | 732 |
| |
733 |
| - | |
| 733 | + | |
| 734 | + | |
734 | 735 |
| |
735 | 736 |
| |
736 | 737 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 |
| - | |
| 125 | + | |
| 126 | + | |
126 | 127 |
| |
127 | 128 |
| |
128 | 129 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2488 | 2488 |
| |
2489 | 2489 |
| |
2490 | 2490 |
| |
2491 |
| - | |
| 2491 | + | |
| 2492 | + | |
2492 | 2493 |
| |
2493 |
| - | |
| 2494 | + | |
| 2495 | + | |
2494 | 2496 |
| |
2495 | 2497 |
| |
2496 | 2498 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
266 | 266 |
| |
267 | 267 |
| |
268 | 268 |
| |
269 |
| - | |
| 269 | + | |
| 270 | + | |
270 | 271 |
| |
271 | 272 |
| |
272 | 273 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2347 | 2347 |
| |
2348 | 2348 |
| |
2349 | 2349 |
| |
2350 |
| - | |
| 2350 | + | |
| 2351 | + | |
2351 | 2352 |
| |
2352 | 2353 |
| |
2353 | 2354 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1148 | 1148 |
| |
1149 | 1149 |
| |
1150 | 1150 |
| |
1151 |
| - | |
| 1151 | + | |
1152 | 1152 |
| |
1153 | 1153 |
| |
1154 | 1154 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4736 | 4736 |
| |
4737 | 4737 |
| |
4738 | 4738 |
| |
4739 |
| - | |
4740 |
| - | |
| 4739 | + | |
| 4740 | + | |
4741 | 4741 |
| |
4742 | 4742 |
| |
4743 | 4743 |
| |
| |||
8527 | 8527 |
| |
8528 | 8528 |
| |
8529 | 8529 |
| |
8530 |
| - | |
| 8530 | + | |
8531 | 8531 |
| |
8532 | 8532 |
| |
8533 | 8533 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3525 | 3525 |
| |
3526 | 3526 |
| |
3527 | 3527 |
| |
3528 |
| - | |
| 3528 | + | |
3529 | 3529 |
| |
3530 | 3530 |
| |
3531 | 3531 |
| |
| |||
3539 | 3539 |
| |
3540 | 3540 |
| |
3541 | 3541 |
| |
3542 |
| - | |
| 3542 | + | |
3543 | 3543 |
| |
3544 | 3544 |
| |
3545 | 3545 |
| |
| |||
4546 | 4546 |
| |
4547 | 4547 |
| |
4548 | 4548 |
| |
4549 |
| - | |
4550 |
| - | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
4551 | 4553 |
| |
4552 | 4554 |
| |
4553 | 4555 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2423 | 2423 |
| |
2424 | 2424 |
| |
2425 | 2425 |
| |
2426 |
| - | |
| 2426 | + | |
| 2427 | + | |
2427 | 2428 |
| |
2428 | 2429 |
| |
2429 | 2430 |
| |
| |||
3214 | 3215 |
| |
3215 | 3216 |
| |
3216 | 3217 |
| |
| 3218 | + | |
3217 | 3219 |
| |
3218 | 3220 |
| |
3219 | 3221 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
78 |
| - | |
| 78 | + | |
| 79 | + | |
79 | 80 |
| |
80 | 81 |
| |
81 | 82 |
| |
| |||
202 | 203 |
| |
203 | 204 |
| |
204 | 205 |
| |
205 |
| - | |
| 206 | + | |
| 207 | + | |
206 | 208 |
| |
207 | 209 |
| |
| 210 | + | |
208 | 211 |
| |
| 212 | + | |
209 | 213 |
| |
210 | 214 |
| |
211 | 215 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
706 | 706 |
| |
707 | 707 |
| |
708 | 708 |
| |
709 |
| - | |
| 709 | + | |
| 710 | + | |
710 | 711 |
| |
711 | 712 |
| |
712 | 713 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 |
| - | |
| 152 | + | |
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
|
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1052 | 1052 |
| |
1053 | 1053 |
| |
1054 | 1054 |
| |
| 1055 | + | |
1055 | 1056 |
| |
| 1057 | + | |
1056 | 1058 |
| |
1057 | 1059 |
| |
1058 |
| - | |
| 1060 | + | |
1059 | 1061 |
| |
1060 | 1062 |
| |
1061 | 1063 |
| |
| |||
1928 | 1930 |
| |
1929 | 1931 |
| |
1930 | 1932 |
| |
1931 |
| - | |
| 1933 | + | |
1932 | 1934 |
| |
1933 | 1935 |
| |
1934 | 1936 |
| |
| |||
2009 | 2011 |
| |
2010 | 2012 |
| |
2011 | 2013 |
| |
2012 |
| - | |
| 2014 | + | |
2013 | 2015 |
| |
2014 | 2016 |
| |
2015 | 2017 |
| |
| |||
2059 | 2061 |
| |
2060 | 2062 |
| |
2061 | 2063 |
| |
2062 |
| - | |
| 2064 | + | |
2063 | 2065 |
| |
2064 | 2066 |
| |
2065 | 2067 |
| |
| |||
2167 | 2169 |
| |
2168 | 2170 |
| |
2169 | 2171 |
| |
2170 |
| - | |
| 2172 | + | |
2171 | 2173 |
| |
2172 | 2174 |
| |
2173 | 2175 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
147 |
| - | |
| 147 | + | |
| 148 | + | |
148 | 149 |
| |
149 | 150 |
| |
150 | 151 |
| |
| |||
740 | 741 |
| |
741 | 742 |
| |
742 | 743 |
| |
743 |
| - | |
| 744 | + | |
| 745 | + | |
744 | 746 |
| |
745 | 747 |
| |
746 | 748 |
| |
| |||
974 | 976 |
| |
975 | 977 |
| |
976 | 978 |
| |
977 |
| - | |
| 979 | + | |
978 | 980 |
| |
979 | 981 |
| |
980 | 982 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
873 | 873 |
| |
874 | 874 |
| |
875 | 875 |
| |
876 |
| - | |
| 876 | + | |
| 877 | + | |
877 | 878 |
| |
878 | 879 |
| |
879 | 880 |
| |
|
0 commit comments
Comments
(0)