mirror of https://github.com/citusdata/citus.git
Merge pull request #12 from citusdata/memcxt
reset memory context at end of executionmerge-cstore-pykello
commit
d352a987fa
|
@ -58,7 +58,7 @@ CStoreTableAMGetOptions(void)
|
||||||
|
|
||||||
|
|
||||||
static MemoryContext
|
static MemoryContext
|
||||||
GetCStoreMemoryContext(void)
|
GetCStoreMemoryContext()
|
||||||
{
|
{
|
||||||
if (CStoreContext == NULL)
|
if (CStoreContext == NULL)
|
||||||
{
|
{
|
||||||
|
@ -69,6 +69,16 @@ GetCStoreMemoryContext(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
ResetCStoreMemoryContext()
|
||||||
|
{
|
||||||
|
if (CStoreContext != NULL)
|
||||||
|
{
|
||||||
|
MemoryContextReset(CStoreContext);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cstore_init_write_state(Relation relation)
|
cstore_init_write_state(Relation relation)
|
||||||
{
|
{
|
||||||
|
@ -591,6 +601,7 @@ CStoreExecutorEnd(QueryDesc *queryDesc)
|
||||||
{
|
{
|
||||||
standard_ExecutorEnd(queryDesc);
|
standard_ExecutorEnd(queryDesc);
|
||||||
}
|
}
|
||||||
|
ResetCStoreMemoryContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue