postgresql/src/backend/access
Robert Haas 3838074f86 Be more aggressive in avoiding tuple conversion.
According to the comments in tupconvert.c, it's necessary to perform
tuple conversion when either table has OIDs, and this was previously
checked by ensuring that the tdtypeid value matched between the tables
in question.  However, that's overly stringent: we have access to
tdhasoid and can test directly whether OIDs are present, which lets us
avoid conversion in cases where the type OIDs are different but the
tuple descriptors are entirely the same (and neither has OIDs).  This
is useful to the partitioning code, which can thereby avoid converting
tuples when inserting into a partition whose columns appear in the
same order as the parent columns, the normal case.  It's possible
for the tuple routing code to avoid some additional overhead in this
case as well, so do that, too.

It's not clear whether it would be OK to skip this when both tables
have OIDs: do callers count on this to build a new tuple (losing the
previous OID) in such instances?  Until we figure it out, leave the
behavior in that case alone.

Amit Langote, reviewed by me.
2017-01-24 21:53:38 -05:00
..
brin Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
common Be more aggressive in avoiding tuple conversion. 2017-01-24 21:53:38 -05:00
gin Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
gist Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
hash Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
heap Fix interaction of partitioned tables with BulkInsertState. 2017-01-24 08:50:16 -05:00
index Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
nbtree Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
rmgrdesc Fix race condition in reading commit timestamps 2017-01-19 18:24:17 -03:00
spgist Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
tablesample Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
transam Logical replication 2017-01-20 09:04:49 -05:00
Makefile TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00