forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6973533
committed
Revise child-to-root tuple conversion map management.
Store the tuple conversion map to convert a tuple from a child table'sformat to the root format in a new ri_ChildToRootMap field inResultRelInfo. It is initialized if transition tuple capture for FORSTATEMENT triggers or INSERT tuple routing on a partitioned table isneeded. Previously, ModifyTable kept the maps in the per-subplanModifyTableState->mt_per_subplan_tupconv_maps array, or when tuplerouting was used, inResultRelInfo->ri_Partitioninfo->pi_PartitionToRootMap. The new fieldreplaces both of those.Now that the child-to-root tuple conversion map is always available inResultRelInfo (when needed), remove the TransitionCaptureState.tcs_mapfield. The callers of Exec*Trigger() functions no longer need to set orsave it, which is much less confusing and bug-prone. Also, as a futureoptimization, this will allow us to delay creating the map for a givenresult relation until the relation is actually processed duringexecution.Author: Amit LangoteDiscussion:https://www.postgresql.org/message-id/CA%2BHiwqHtCWLdK-LO%3DNEsvOdHx%2B7yv4mE_zYK0i3BH7dXb-wxog%40mail.gmail.com1 parentf49b85d commit6973533
File tree
8 files changed
+84
-215
lines changed- src
- backend
- commands
- executor
- include
- commands
- executor
- nodes
8 files changed
+84
-215
lines changedLines changed: 6 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3106 | 3106 |
| |
3107 | 3107 |
| |
3108 | 3108 |
| |
3109 |
| - | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
3110 | 3113 |
| |
3111 | 3114 |
| |
3112 |
| - | |
3113 |
| - | |
3114 |
| - | |
3115 |
| - | |
3116 |
| - | |
3117 |
| - | |
3118 |
| - | |
3119 |
| - | |
3120 |
| - | |
3121 |
| - | |
3122 |
| - | |
3123 |
| - | |
3124 |
| - | |
3125 |
| - | |
3126 |
| - | |
3127 |
| - | |
3128 |
| - | |
3129 |
| - | |
3130 |
| - | |
3131 |
| - | |
3132 |
| - | |
3133 |
| - | |
| 3115 | + | |
| 3116 | + | |
3134 | 3117 |
| |
3135 | 3118 |
| |
3136 | 3119 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
38 | 39 |
| |
39 | 40 |
| |
40 | 41 |
| |
| |||
4292 | 4293 |
| |
4293 | 4294 |
| |
4294 | 4295 |
| |
4295 |
| - | |
4296 |
| - | |
4297 |
| - | |
| 4296 | + | |
| 4297 | + | |
| 4298 | + | |
| 4299 | + | |
4298 | 4300 |
| |
4299 | 4301 |
| |
4300 | 4302 |
| |
| |||
5389 | 5391 |
| |
5390 | 5392 |
| |
5391 | 5393 |
| |
5392 |
| - | |
| 5394 | + | |
5393 | 5395 |
| |
5394 | 5396 |
| |
5395 | 5397 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1244 | 1244 |
| |
1245 | 1245 |
| |
1246 | 1246 |
| |
| 1247 | + | |
1247 | 1248 |
| |
1248 | 1249 |
| |
1249 | 1250 |
| |
|
Lines changed: 9 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
907 | 907 |
| |
908 | 908 |
| |
909 | 909 |
| |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
910 | 919 |
| |
911 | 920 |
| |
912 | 921 |
| |
| |||
976 | 985 |
| |
977 | 986 |
| |
978 | 987 |
| |
979 |
| - | |
980 |
| - | |
981 |
| - | |
982 |
| - | |
983 |
| - | |
984 |
| - | |
985 |
| - | |
986 |
| - | |
987 |
| - | |
988 |
| - | |
989 |
| - | |
990 |
| - | |
991 |
| - | |
992 |
| - | |
993 | 988 |
| |
994 | 989 |
| |
995 | 990 |
| |
|
0 commit comments
Comments
(0)