]> granicus.if.org Git - postgresql/commit
Pull up isReset flag from AllocSetContext to MemoryContext struct. This
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sat, 21 May 2011 18:47:19 +0000 (14:47 -0400)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sat, 21 May 2011 18:47:19 +0000 (14:47 -0400)
commit30e98a7e6e4869a7d6b3748ac9770bb8d69a8b26
tree804de2246baa5d034a571ecae762e7379f0de3a5
parent0319da638f337cae66a4649581dc1f33d5079e1a
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.
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/mcxt.c
src/include/nodes/memnodes.h