diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c index 026f545676..590595bf25 100644 --- a/src/backend/utils/mmgr/aset.c +++ b/src/backend/utils/mmgr/aset.c @@ -427,6 +427,8 @@ AllocSetContextCreateInternal(MemoryContext parent, ((MemoryContext) set)->mem_allocated = set->keeper->endptr - ((char *) set); + elog(DEBUG1, "AllocSetContextCreateInternal: recycling context for %s", ((MemoryContext) set)->name); + return (MemoryContext) set; } } @@ -522,6 +524,8 @@ AllocSetContextCreateInternal(MemoryContext parent, ((MemoryContext) set)->mem_allocated = firstBlockSize; + elog(DEBUG1, "AllocSetContextCreateInternal: allocating new context for %s (%zu bytes)", ((MemoryContext)set)->name, firstBlockSize); + return (MemoryContext) set; } @@ -733,6 +737,8 @@ AllocSetAlloc(MemoryContext context, Size size) if (block == NULL) return NULL; + elog(DEBUG1, "AllocSetAlloc: malloc(%zu) dedicated block: %s", blksize, context->name); + context->mem_allocated += blksize; block->aset = set; @@ -943,6 +949,8 @@ AllocSetAlloc(MemoryContext context, Size size) if (block == NULL) return NULL; + elog(DEBUG1, "AllocSetAlloc: malloc(%zu) new block: %s", blksize, context->name); + context->mem_allocated += blksize; block->aset = set;