Invent a new memory context primitive, MemoryContextSetParent.
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/mmgr/mcxt.c | modified | +63 −19 |
| src/include/utils/memutils.h | modified | +2 −0 |