- Notifications
You must be signed in to change notification settings - Fork5
Commit3838074
committed
Be more aggressive in avoiding tuple conversion.
According to the comments in tupconvert.c, it's necessary to performtuple conversion when either table has OIDs, and this was previouslychecked by ensuring that the tdtypeid value matched between the tablesin question. However, that's overly stringent: we have access totdhasoid and can test directly whether OIDs are present, which lets usavoid conversion in cases where the type OIDs are different but thetuple descriptors are entirely the same (and neither has OIDs). Thisis useful to the partitioning code, which can thereby avoid convertingtuples when inserting into a partition whose columns appear in thesame order as the parent columns, the normal case. It's possiblefor the tuple routing code to avoid some additional overhead in thiscase as well, so do that, too.It's not clear whether it would be OK to skip this when both tableshave OIDs: do callers count on this to build a new tuple (losing theprevious OID) in such instances? Until we figure it out, leave thebehavior in that case alone.Amit Langote, reviewed by me.1 parent7fa7bf1 commit3838074
2 files changed
+11
-10
lines changedLines changed: 10 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
142 |
| - | |
143 |
| - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
144 | 145 |
| |
145 | 146 |
| |
146 |
| - | |
| 147 | + | |
147 | 148 |
| |
148 | 149 |
| |
149 | 150 |
| |
| |||
214 | 215 |
| |
215 | 216 |
| |
216 | 217 |
| |
217 |
| - | |
218 |
| - | |
219 |
| - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
220 | 222 |
| |
221 | 223 |
| |
222 |
| - | |
| 224 | + | |
223 | 225 |
| |
224 | 226 |
| |
225 | 227 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1700 | 1700 |
| |
1701 | 1701 |
| |
1702 | 1702 |
| |
1703 |
| - | |
| 1703 | + | |
1704 | 1704 |
| |
1705 | 1705 |
| |
1706 | 1706 |
| |
1707 | 1707 |
| |
1708 |
| - | |
1709 | 1708 |
| |
1710 | 1709 |
| |
1711 | 1710 |
| |
|
0 commit comments
Comments
(0)