pgsql: Invent a memory context reset/delete callback mechanism.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Invent a memory context reset/delete callback mechanism.
Дата
Msg-id E1YRTDR-0004to-LH@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Invent a memory context reset/delete callback mechanism.  (Simon Riggs <simon@2ndQuadrant.com>)
Re: pgsql: Invent a memory context reset/delete callback mechanism.  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-committers
Invent a memory context reset/delete callback mechanism.

This allows cleanup actions to be registered to be called just before a
particular memory context's contents are flushed (either by deletion or
MemoryContextReset).  The patch in itself has no use-cases for this, but
several likely reasons for wanting this exist.

In passing, per discussion, rearrange some boolean fields in struct
MemoryContextData so as to avoid wasted padding space.  For safety,
this requires making allowInCritSection's existence unconditional;
but I think that's a better approach than what was there anyway.

Branch
------
master

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

Modified Files
--------------
src/backend/utils/mmgr/mcxt.c |   71 ++++++++++++++++++++++++++++++++++++-----
src/include/nodes/memnodes.h  |   24 +++++++++++---
src/include/utils/memutils.h  |    2 ++
3 files changed, 85 insertions(+), 12 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix a couple of trivial issues in jsonb.c
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Make CREATE OR REPLACE VIEW internally more consistent