Pull up isReset flag from AllocSetContext to MemoryContext struct. This
Heikki Linnakangas <heikki.linnakangas@iki.fi>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/mmgr/aset.c | modified | +2 −23 |
| src/backend/utils/mmgr/mcxt.c | modified | +16 −2 |
| src/include/nodes/memnodes.h | modified | +1 −0 |