提交 c1f122e5 编写于 作者: A aqktjcm 提交者: Hubert Zhang

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 #9676.
上级 f656b50e
......@@ -1191,6 +1191,8 @@ tuplesort_putindextuplevalues_mk(Tuplesortstate_mk *state, Relation rel,
COPYTUP(state, &e, (void *) tuple);
puttuple_common(state, &e);
pfree(tuple);
MemoryContextSwitchTo(oldcontext);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册