]> granicus.if.org Git - postgresql/commit
Make TupleTableSlots extensible, finish split of existing slot type.
authorAndres Freund <andres@anarazel.de>
Sat, 17 Nov 2018 00:35:11 +0000 (16:35 -0800)
committerAndres Freund <andres@anarazel.de>
Sat, 17 Nov 2018 00:35:15 +0000 (16:35 -0800)
commit4da597edf1bae0cf0453b5ed6fc4347b6334dfe1
tree1311627bcb3c21c15d3bed719b16bf5254289e93
parent0201d79a5549e3375ea5e5aee351378399453f15
Make TupleTableSlots extensible, finish split of existing slot type.

This commit completes the work prepared in 1a0586de36, splitting the
old TupleTableSlot implementation (which could store buffer, heap,
minimal and virtual slots) into four different slot types.  As
described in the aforementioned commit, this is done with the goal of
making tuple table slots extensible, to allow for pluggable table
access methods.

To achieve runtime extensibility for TupleTableSlots, operations on
slots that can differ between types of slots are performed using the
TupleTableSlotOps struct provided at slot creation time.  That
includes information from the size of TupleTableSlot struct to be
allocated, initialization, deforming etc.  See the struct's definition
for more detailed information about callbacks TupleTableSlotOps.

I decided to rename TTSOpsBufferTuple to TTSOpsBufferHeapTuple and
ExecCopySlotTuple to ExecCopySlotHeapTuple, as that seems more
consistent with other naming introduced in recent patches.

There's plenty optimization potential in the slot implementation, but
according to benchmarking the state after this commit has similar
performance characteristics to before this set of changes, which seems
sufficient.

There's a few changes in execReplication.c that currently need to poke
through the slot abstraction, that'll be repaired once the pluggable
storage patchset provides the necessary infrastructure.

Author: Andres Freund and  Ashutosh Bapat, with changes by Amit Khandekar
Discussion: https://postgr.es/m/20181105210039.hh4vvi4vwoq5ba2q@alap3.anarazel.de
27 files changed:
src/backend/access/common/heaptuple.c
src/backend/catalog/index.c
src/backend/commands/copy.c
src/backend/commands/createas.c
src/backend/commands/matview.c
src/backend/executor/execCurrent.c
src/backend/executor/execExprInterp.c
src/backend/executor/execReplication.c
src/backend/executor/execScan.c
src/backend/executor/execTuples.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeModifyTable.c
src/backend/executor/nodeSamplescan.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeSubplan.c
src/backend/executor/nodeTidscan.c
src/backend/executor/spi.c
src/backend/jit/llvm/llvmjit.c
src/backend/jit/llvm/llvmjit_deform.c
src/backend/jit/llvm/llvmjit_types.c
src/include/access/htup_details.h
src/include/executor/tuptable.h
src/include/jit/llvmjit.h