Invent a new memory context primitive, MemoryContextSetParent.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b0025bd95703aaedc4ff23ddcfbde9597fa0919d
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-09-11T20:29:42Z
Releases: 9.2.0
Invent a new memory context primitive, MemoryContextSetParent.

This function will be useful for altering the lifespan of a context after
creation (for example, by creating it under a transient context and later
reparenting it to belong to a long-lived context).  It costs almost no new
code, since we can refactor what was there.  Per my proposal of yesterday.

Files

PathChange+/−
src/backend/utils/mmgr/mcxt.c modified +63 −19
src/include/utils/memutils.h modified +2 −0