From e64c7feb2fd80c89d2220cbe9e026a031f34509c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 15 Dec 2002 21:01:34 +0000 Subject: Tweak default memory context allocation policy so that a context is not given any malloc block until something is first allocated in it; but thereafter, MemoryContextReset won't release that first malloc block. This preserves the quick-reset property of the original policy, without forcing 8K to be allocated to every context whether any of it is ever used or not. Also, remove some more no-longer-needed explicit freeing during ExecEndPlan. --- src/include/nodes/execnodes.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/include/nodes/execnodes.h') diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 65c5f23884d..b57d7ac58cc 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: execnodes.h,v 1.86 2002/12/15 16:17:56 tgl Exp $ + * $Id: execnodes.h,v 1.87 2002/12/15 21:01:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -218,16 +218,7 @@ typedef struct ProjectionInfo * cleanMap: A map with the correspondence between the non-junk * attribute numbers of the "original" tuple and the * attribute numbers of the "clean" tuple. - * junkContext: memory context holding the JunkFilter node and all - * its subsidiary data structures. * resultSlot: tuple slot that can be used to hold cleaned tuple. - * - * NOTE: the original targetList and tupType are passed to ExecInitJunkFilter, - * as is the resultSlot. These items do not belong to the JunkFilter. All - * the other subsidiary structures are created during ExecInitJunkFilter, - * and all of them can be freed by deleting the memory context junkContext. - * This would not be needed if we had a cleaner approach to managing - * query-lifetime data structures... * ---------------- */ typedef struct JunkFilter @@ -240,7 +231,6 @@ typedef struct JunkFilter int jf_cleanLength; TupleDesc jf_cleanTupType; AttrNumber *jf_cleanMap; - MemoryContext jf_junkContext; TupleTableSlot *jf_resultSlot; } JunkFilter; -- cgit v1.2.3