*/
ExecClearTuple(slot);
- /* Also must reset the hashtempcxt after each hashtable lookup. */
- MemoryContextReset(node->hashtempcxt);
+ /* Also must reset the innerecontext after each hashtable lookup. */
+ ResetExprContext(node->innerecontext);
return BoolGetDatum(result);
}
0,
node->planstate->state->es_query_cxt,
node->hashtablecxt,
- node->hashtempcxt,
+ innerecontext->ecxt_per_tuple_memory,
false);
if (!subplan->unknownEqFalse)
0,
node->planstate->state->es_query_cxt,
node->hashtablecxt,
- node->hashtempcxt,
+ innerecontext->ecxt_per_tuple_memory,
false);
}
else
/*
* Reset innerecontext after each inner tuple to free any memory used
- * during ExecProject.
+ * during ExecProject and hashtable lookup.
*/
ResetExprContext(innerecontext);
-
- /* Also must reset the hashtempcxt after each hashtable lookup. */
- MemoryContextReset(node->hashtempcxt);
}
/*
sstate->hashtable = NULL;
sstate->hashnulls = NULL;
sstate->hashtablecxt = NULL;
- sstate->hashtempcxt = NULL;
sstate->innerecontext = NULL;
sstate->keyColIdx = NULL;
sstate->tab_eq_funcoids = NULL;
AllocSetContextCreate(CurrentMemoryContext,
"Subplan HashTable Context",
ALLOCSET_DEFAULT_SIZES);
- /* and a small one for the hash tables to use as temp storage */
- sstate->hashtempcxt =
- AllocSetContextCreate(CurrentMemoryContext,
- "Subplan HashTable Temp Context",
- ALLOCSET_SMALL_SIZES);
/* and a short-lived exprcontext for function evaluation */
sstate->innerecontext = CreateExprContext(estate);
bool havehashrows; /* true if hashtable is not empty */
bool havenullrows; /* true if hashnulls is not empty */
MemoryContext hashtablecxt; /* memory context containing hash tables */
- MemoryContext hashtempcxt; /* temp memory context for hash tables */
ExprContext *innerecontext; /* econtext for computing inner tuples */
int numCols; /* number of columns being hashed */
/* each of the remaining fields is an array of length numCols: */