Thread: pgsql: Use MinimalTuple for tuple queues.
Use MinimalTuple for tuple queues. This representation saves 8 bytes per tuple compared to HeapTuple, and avoids the need to allocate, copy and free on the receiving side. Gather can emit the returned MinimalTuple directly, but GatherMerge now needs to make an explicit copy because it buffers multiple tuples at a time. That should be no worse than before. Reviewed-by: Soumyadeep Chakraborty <soumyadeep2007@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKG%2B8T_ggoUTAE-U%3DA%2BOcPc4%3DB0nPPHcSfffuQhvXXjML6w%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cdc7169509113018cc389da740e950c587b5751f Modified Files -------------- src/backend/executor/nodeGather.c | 16 ++++++------- src/backend/executor/nodeGatherMerge.c | 40 ++++++++++++++++++--------------- src/backend/executor/tqueue.c | 30 ++++++++++++------------- src/backend/optimizer/plan/createplan.c | 8 ++++--- src/include/executor/tqueue.h | 4 ++-- 5 files changed, 51 insertions(+), 47 deletions(-)