fix memory leak when creating index
Memory pointed to by tuple was not released in time. The process of creating index will crash if the count of table's rows is big enough.
This pull request is to solve the issue
@@ -1192,6 +1192,8 @@ tuplesort_putindextuplevalues_mk(Tuplesortstate_mk *state, Relation rel,
COPYTUP(state, &e, (void *) tuple);
puttuple_common(state, &e);
+ pfree(tuple);
+
MemoryContextSwitchTo(oldcontext);
}
