aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeSubplan.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-11-16 16:35:11 -0800
committerAndres Freund <andres@anarazel.de>2018-11-16 16:35:15 -0800
commit4da597edf1bae0cf0453b5ed6fc4347b6334dfe1 (patch)
tree1311627bcb3c21c15d3bed719b16bf5254289e93 /src/backend/executor/nodeSubplan.c
parent0201d79a5549e3375ea5e5aee351378399453f15 (diff)
downloadpostgresql-4da597edf1bae0cf0453b5ed6fc4347b6334dfe1.tar.gz
postgresql-4da597edf1bae0cf0453b5ed6fc4347b6334dfe1.zip
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
Diffstat (limited to 'src/backend/executor/nodeSubplan.c')
-rw-r--r--src/backend/executor/nodeSubplan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index b42e60576e3..87429092c72 100644
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -357,7 +357,7 @@ ExecScanSubPlan(SubPlanState *node,
*/
if (node->curTuple)
heap_freetuple(node->curTuple);
- node->curTuple = ExecCopySlotTuple(slot);
+ node->curTuple = ExecCopySlotHeapTuple(slot);
result = heap_getattr(node->curTuple, 1, tdesc, isNull);
/* keep scanning subplan to make sure there's only one tuple */
@@ -1137,7 +1137,7 @@ ExecSetParamPlan(SubPlanState *node, ExprContext *econtext)
*/
if (node->curTuple)
heap_freetuple(node->curTuple);
- node->curTuple = ExecCopySlotTuple(slot);
+ node->curTuple = ExecCopySlotHeapTuple(slot);
/*
* Now set all the setParam params from the columns of the tuple