postgresql/src/backend
Heikki Linnakangas 6973533650 Revise child-to-root tuple conversion map management.
Store the tuple conversion map to convert a tuple from a child table's
format to the root format in a new ri_ChildToRootMap field in
ResultRelInfo. It is initialized if transition tuple capture for FOR
STATEMENT triggers or INSERT tuple routing on a partitioned table is
needed. Previously, ModifyTable kept the maps in the per-subplan
ModifyTableState->mt_per_subplan_tupconv_maps array, or when tuple
routing was used, in
ResultRelInfo->ri_Partitioninfo->pi_PartitionToRootMap. The new field
replaces both of those.

Now that the child-to-root tuple conversion map is always available in
ResultRelInfo (when needed), remove the TransitionCaptureState.tcs_map
field. The callers of Exec*Trigger() functions no longer need to set or
save it, which is much less confusing and bug-prone. Also, as a future
optimization, this will allow us to delay creating the map for a given
result relation until the relation is actually processed during
execution.

Author: Amit Langote
Discussion: https://www.postgresql.org/message-id/CA%2BHiwqHtCWLdK-LO%3DNEsvOdHx%2B7yv4mE_zYK0i3BH7dXb-wxog%40mail.gmail.com
2020-10-19 14:42:55 +03:00
..
access Revert "Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls" 2020-10-15 15:16:11 -03:00
bootstrap Make postgres.bki use the same literal-string syntax as postgresql.conf. 2020-10-04 16:09:55 -04:00
catalog Review logical replication tablesync code 2020-10-15 11:35:51 -03:00
commands Revise child-to-root tuple conversion map management. 2020-10-19 14:42:55 +03:00
executor Revise child-to-root tuple conversion map management. 2020-10-19 14:42:55 +03:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit llvmjit: Work around bug in LLVM 3.9 causing crashes after 72559438f9. 2020-10-15 18:17:00 -07:00
lib Use pg_bitutils for HyperLogLog. 2020-07-30 09:14:23 -07:00
libpq Replace calls of htonl()/ntohl() with pg_bswap.h for GSSAPI encryption 2020-10-15 17:03:56 +09:00
main Clean up includes of s_lock.h. 2020-06-18 19:41:05 -07:00
nodes Include result relation info in direct modify ForeignScan nodes. 2020-10-14 10:58:38 +03:00
optimizer Prevent overly large and NaN row estimates in relations 2020-10-19 10:53:52 +13:00
parser Correct error message 2020-10-14 07:54:14 +02:00
partitioning Improve error cursor positions for problems with partition bounds. 2020-09-23 18:04:53 -04:00
po Translation updates 2020-05-18 12:49:30 +02:00
port Recognize network-failure errnos as indicating hard connection loss. 2020-10-10 13:28:12 -04:00
postmaster Track statistics for spilling of changes from ReorderBuffer. 2020-10-08 09:09:08 +05:30
regex Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
replication Review logical replication tablesync code 2020-10-15 11:35:51 -03:00
rewrite Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE. 2020-08-30 12:21:51 -04:00
snowball code: replace most remaining uses of 'master'. 2020-07-08 13:24:35 -07:00
statistics Remove some more useless assignments. 2020-09-04 14:32:19 -04:00
storage Avoid invalid alloc size error in shm_mq 2020-10-19 08:52:25 +02:00
tcop Fix bogus completion tag usage in walsender 2020-09-16 21:16:25 -03:00
tsearch Improve behavior of tsearch_readline(), and remove t_readline(). 2020-09-23 20:26:58 -04:00
utils Fixup some appendStringInfo and appendPQExpBuffer calls 2020-10-15 20:35:17 +13:00
.gitignore
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Add missing gettext triggers 2020-04-28 13:35:40 +02:00