diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-05-21 14:47:19 -0400 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-05-21 14:47:19 -0400 |
commit | 30e98a7e6e4869a7d6b3748ac9770bb8d69a8b26 (patch) | |
tree | 804de2246baa5d034a571ecae762e7379f0de3a5 /src/include | |
parent | 0319da638f337cae66a4649581dc1f33d5079e1a (diff) | |
download | postgresql-30e98a7e6e4869a7d6b3748ac9770bb8d69a8b26.tar.gz |
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')
-rw-r--r-- | src/include/nodes/memnodes.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h index b62ed8f904..62a0f9730e 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 */ |