summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorHeikki Linnakangas2011-05-21 18:47:19 +0000
committerHeikki Linnakangas2011-05-21 18:47:19 +0000
commit30e98a7e6e4869a7d6b3748ac9770bb8d69a8b26 (patch)
tree804de2246baa5d034a571ecae762e7379f0de3a5 /src/include/nodes
parent0319da638f337cae66a4649581dc1f33d5079e1a (diff)
Pull up isReset flag from AllocSetContext to MemoryContext struct. This
avoids the overhead of one function call when calling MemoryContextReset(), and it seems like the isReset optimization would be applicable to any new memory context we might invent in the future anyway. This buys back the overhead I just added in previous patch to always call MemoryContextReset() in ExecScan, even when there's no quals or projections.
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/memnodes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index b62ed8f904a..62a0f9730ed 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -59,6 +59,7 @@ typedef struct MemoryContextData
MemoryContext firstchild; /* head of linked list of children */
MemoryContext nextchild; /* next child of same parent */
char *name; /* context name (just for debugging) */
+ bool isReset; /* T = no space alloced since last reset */
} MemoryContextData;
/* utils/palloc.h contains typedef struct MemoryContextData *MemoryContext */