forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1ef6bd2
committed
Don't require return slots for nodes without projection.
In a lot of nodes the return slot is not required. That can either bebecause the node doesn't do any projection (say an Append node), orbecause the node does perform projections but the projection isoptimized away because the projection would yield an identical row.Slots aren't that small, especially for wide rows, so it's worthwhileto avoid creating them. It's not possible to just skip creating theslot - it's currently used to determine the tuple descriptor returnedby ExecGetResultType(). So separate the determination of the resulttype from the slot creation. The work previously done internallyExecInitResultTupleSlotTL() can now also be done separately withExecInitResultTypeTL() and ExecInitResultSlot(). That way nodes thataren't guaranteed to need a result slot, can useExecInitResultTypeTL() to determine the result type of the node, andExecAssignScanProjectionInfo() (viaExecConditionalAssignProjectionInfo()) determines that a result slotis needed, it is created with ExecInitResultSlot().Besides the advantage of avoiding to create slots that then areunused, this is necessary preparation for later patches around tupletable slot abstraction. In particular separating the return descriptorand slot is a prerequisite to allow JITing of tuple deforming withknowledge of the underlying tuple format, and to avoid unnecessarilycreating JITed tuple deforming for virtual slots.This commit removes a redundant argument fromExecInitResultTupleSlotTL(). While this commit touches a lot of therelevant lines anyway, it'd normally still not worthwhile to causebreakage, except that aforementioned later commits will touch *all*ExecInitResultTupleSlotTL() callers anyway (but fits worsethematically).Author: Andres FreundDiscussion:https://postgr.es/m/20181105210039.hh4vvi4vwoq5ba2q@alap3.anarazel.de1 parent3ce1201 commit1ef6bd2
File tree
40 files changed
+168
-117
lines changed- src
- backend/executor
- include
- executor
- nodes
40 files changed
+168
-117
lines changedLines changed: 53 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 |
| |
27 | 30 |
| |
28 | 31 |
| |
29 | 32 |
| |
30 |
| - | |
| 33 | + | |
31 | 34 |
| |
32 |
| - | |
33 |
| - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 |
| |
35 | 39 |
| |
36 | 40 |
| |
| |||
902 | 906 |
| |
903 | 907 |
| |
904 | 908 |
| |
905 |
| - | |
906 |
| - | |
907 |
| - | |
908 |
| - | |
909 |
| - | |
910 |
| - | |
911 |
| - | |
912 |
| - | |
913 |
| - | |
914 | 909 |
| |
915 |
| - | |
| 910 | + | |
916 | 911 |
| |
917 |
| - | |
| 912 | + | |
918 | 913 |
| |
919 | 914 |
| |
920 | 915 |
| |
921 |
| - | |
| 916 | + | |
922 | 917 |
| |
923 | 918 |
| |
924 | 919 |
| |
| |||
934 | 929 |
| |
935 | 930 |
| |
936 | 931 |
| |
| 932 | + | |
| 933 | + | |
937 | 934 |
| |
938 |
| - | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
939 | 972 |
| |
940 | 973 |
| |
941 | 974 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
451 | 451 |
| |
452 | 452 |
| |
453 | 453 |
| |
454 |
| - | |
455 |
| - | |
456 |
| - | |
| 454 | + | |
457 | 455 |
| |
458 | 456 |
| |
459 | 457 |
| |
| |||
496 | 494 |
| |
497 | 495 |
| |
498 | 496 |
| |
| 497 | + | |
| 498 | + | |
| 499 | + | |
499 | 500 |
| |
| 501 | + | |
500 | 502 |
| |
501 | 503 |
| |
502 | 504 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2219 | 2219 |
| |
2220 | 2220 |
| |
2221 | 2221 |
| |
2222 |
| - | |
| 2222 | + | |
2223 | 2223 |
| |
2224 | 2224 |
| |
2225 | 2225 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
199 |
| - | |
| 199 | + | |
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
800 | 800 |
| |
801 | 801 |
| |
802 | 802 |
| |
803 |
| - | |
| 803 | + | |
| 804 | + | |
804 | 805 |
| |
805 | 806 |
| |
806 | 807 |
| |
| |||
916 | 917 |
| |
917 | 918 |
| |
918 | 919 |
| |
919 |
| - | |
| 920 | + | |
920 | 921 |
| |
921 |
| - | |
| 922 | + | |
922 | 923 |
| |
923 | 924 |
| |
924 | 925 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
263 | 263 |
| |
264 | 264 |
| |
265 | 265 |
| |
266 |
| - | |
| 266 | + | |
267 | 267 |
| |
268 |
| - | |
| 268 | + | |
269 | 269 |
| |
270 | 270 |
| |
271 | 271 |
| |
| |||
294 | 294 |
| |
295 | 295 |
| |
296 | 296 |
| |
297 |
| - | |
| 297 | + | |
| 298 | + | |
298 | 299 |
| |
299 | 300 |
| |
300 | 301 |
| |
| |||
318 | 319 |
| |
319 | 320 |
| |
320 | 321 |
| |
321 |
| - | |
| 322 | + | |
| 323 | + | |
322 | 324 |
| |
323 | 325 |
| |
324 | 326 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
87 | 87 |
| |
88 | 88 |
| |
89 | 89 |
| |
90 |
| - | |
| 90 | + | |
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
198 | 198 |
| |
199 | 199 |
| |
200 | 200 |
| |
201 |
| - | |
| 201 | + | |
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
| |||
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
259 |
| - | |
| 259 | + | |
| 260 | + | |
260 | 261 |
| |
261 | 262 |
| |
262 | 263 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
487 | 487 |
| |
488 | 488 |
| |
489 | 489 |
| |
490 |
| - | |
| 490 | + | |
491 | 491 |
| |
492 | 492 |
| |
493 | 493 |
| |
| |||
529 | 529 |
| |
530 | 530 |
| |
531 | 531 |
| |
532 |
| - | |
| 532 | + | |
| 533 | + | |
533 | 534 |
| |
534 | 535 |
| |
535 | 536 |
| |
| |||
563 | 564 |
| |
564 | 565 |
| |
565 | 566 |
| |
566 |
| - | |
| 567 | + | |
| 568 | + | |
567 | 569 |
| |
568 | 570 |
| |
569 | 571 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
| 95 | + | |
96 | 96 |
| |
97 |
| - | |
| 97 | + | |
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
| |||
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
234 |
| - | |
| 234 | + | |
| 235 | + | |
235 | 236 |
| |
236 | 237 |
| |
237 | 238 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 |
| - | |
| 120 | + | |
121 | 121 |
| |
122 |
| - | |
| 122 | + | |
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
| |||
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
275 |
| - | |
| 275 | + | |
| 276 | + | |
276 | 277 |
| |
277 | 278 |
| |
278 | 279 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
196 |
| - | |
| 196 | + | |
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
382 | 382 |
| |
383 | 383 |
| |
384 | 384 |
| |
385 |
| - | |
| 385 | + | |
386 | 386 |
| |
387 | 387 |
| |
388 | 388 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
644 | 644 |
| |
645 | 645 |
| |
646 | 646 |
| |
647 |
| - | |
| 647 | + | |
648 | 648 |
| |
649 | 649 |
| |
650 | 650 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
399 | 399 |
| |
400 | 400 |
| |
401 | 401 |
| |
402 |
| - | |
| 402 | + | |
| 403 | + | |
403 | 404 |
| |
404 | 405 |
| |
405 | 406 |
| |
| |||
529 | 530 |
| |
530 | 531 |
| |
531 | 532 |
| |
532 |
| - | |
533 |
| - | |
534 |
| - | |
| 533 | + | |
| 534 | + | |
535 | 535 |
| |
536 |
| - | |
| 536 | + | |
537 | 537 |
| |
538 | 538 |
| |
539 | 539 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
822 | 822 |
| |
823 | 823 |
| |
824 | 824 |
| |
825 |
| - | |
| 825 | + | |
| 826 | + | |
826 | 827 |
| |
827 | 828 |
| |
828 | 829 |
| |
| |||
947 | 948 |
| |
948 | 949 |
| |
949 | 950 |
| |
950 |
| - | |
| 951 | + | |
951 | 952 |
| |
952 |
| - | |
| 953 | + | |
953 | 954 |
| |
954 | 955 |
| |
955 | 956 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
379 |
| - | |
380 |
| - | |
| 379 | + | |
381 | 380 |
| |
382 |
| - | |
| 381 | + | |
383 | 382 |
| |
384 | 383 |
| |
385 | 384 |
| |
|
0 commit comments
Comments
(0)