postgresql/src/backend
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
..
access Be more aggressive in avoiding tuple conversion. 2017-01-24 21:53:38 -05:00
bootstrap Remove dead code in bootstrap 2017-01-17 16:54:40 -03:00
catalog Be more aggressive in avoiding tuple conversion. 2017-01-24 21:53:38 -05:00
commands Reindent table partitioning code. 2017-01-24 10:20:02 -05:00
executor Fix things so that updatable views work with partitioned tables. 2017-01-24 15:46:50 -05:00
foreign Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
lib Fix overflow check in StringInfo; add missing casts 2017-01-10 11:41:13 -03:00
libpq Rename C symbols for backend lo_ functions 2017-01-17 12:35:30 -05:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Logical replication 2017-01-20 09:04:49 -05:00
optimizer Fix example plan in optimizer/README. 2017-01-23 09:38:36 -05:00
parser Move some things from builtins.h to new header files 2017-01-20 20:29:53 -05:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Move some things from builtins.h to new header files 2017-01-20 20:29:53 -05:00
regex Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
replication Add a SHOW command to the replication command language. 2017-01-24 17:04:12 -05:00
rewrite Fix things so that updatable views work with partitioned tables. 2017-01-24 15:46:50 -05:00
snowball Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
storage Fix comments in StrategyNotifyBgWriter(). 2017-01-24 09:39:11 +09:00
tcop Add a new DestReceiver for printing tuples without catalog access. 2017-01-24 16:53:56 -05:00
tsearch Move some things from builtins.h to new header files 2017-01-20 20:29:53 -05:00
utils Add a SHOW command to the replication command language. 2017-01-24 17:04:12 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Fix parallel make issue with new fmgrprotos.h 2017-01-23 15:36:27 -05:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00