pgsql: Invent a new memory context primitive, MemoryContextSetParent.

Started by Tom Lanealmost 15 years ago1 messagescomitters
Jump to latest
#1Tom 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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b0025bd95703aaedc4ff23ddcfbde9597fa0919d

Modified Files
--------------
src/backend/utils/mmgr/mcxt.c | 82 +++++++++++++++++++++++++++++++---------
src/include/utils/memutils.h | 2 +
2 files changed, 65 insertions(+), 19 deletions(-)