summaryrefslogtreecommitdiff
path: root/src/backend/utils/mmgr/README
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/mmgr/README')
-rw-r--r--src/backend/utils/mmgr/README11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/utils/mmgr/README b/src/backend/utils/mmgr/README
index 45e610dd06..4ebb78e4eb 100644
--- a/src/backend/utils/mmgr/README
+++ b/src/backend/utils/mmgr/README
@@ -125,9 +125,14 @@ lifetimes that only partially overlap can be handled by allocating
from different trees of the context forest (there are some examples
in the next section).
-For convenience we will also want operations like "reset/delete all
-children of a given context, but don't reset or delete that context
-itself".
+Actually, it turns out that resetting a given context should almost
+always imply deleting (not just resetting) any child contexts it has.
+So MemoryContextReset() means that, and if you really do want a tree of
+empty contexts you need to call MemoryContextResetOnly() plus
+MemoryContextResetChildren().
+
+For convenience we also provide operations like "reset/delete all children
+of a given context, but don't reset or delete that context itself".
Globally Known Contexts