Re: Memory context can be its own parent and child in replication command

Поиск
Список
Период
Сортировка
От Anthonin Bonnefoy
Тема Re: Memory context can be its own parent and child in replication command
Дата
Msg-id CAO6_XqrSYJdmp9EOpj1RztEEpdwgtAiXK5m+OCg0LMY0JK1Njg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Memory context can be its own parent and child in replication command  (Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>)
Ответы Re: Memory context can be its own parent and child in replication command
Список pgsql-hackers
On Tue, Mar 11, 2025 at 10:26 AM Anthonin Bonnefoy
<anthonin.bonnefoy@datadoghq.com> wrote:
> --- a/src/backend/utils/mmgr/mcxt.c
> +++ b/src/backend/utils/mmgr/mcxt.c
> @@ -527,6 +527,7 @@ MemoryContextDeleteOnly(MemoryContext context)
>
>         context->methods->delete_context(context);
>
> +       context->type = T_Invalid;
>         VALGRIND_DESTROY_MEMPOOL(context);
>  }
>
> However, when testing this on my mac, it seems to trigger a heap
> corruption during initdb.

Which is normal since this would only work with AllocSet as other
delelte_context methods would just free the context... A better spot
would be just before putting the context in the freelist in
AllocSetDelete.



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