mirror of
https://github.com/postgres/postgres.git
synced 2025-09-08 00:47:37 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user