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

Поиск
Список
Период
Сортировка
От Rahila Syed
Тема Re: Memory context can be its own parent and child in replication command
Дата
Msg-id CAH2L28s3i=JecJb5uyGtwt0uHMRqTS26ZJQTGFzScMm7nMuh5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Memory context can be its own parent and child in replication command  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Memory context can be its own parent and child in replication command
Список pgsql-hackers
Hi,


So here's a v4 with the test restored.
 
I tested this patch, it fixes the issue reported. It passes Github CI tests.
 
already does that, so the only new assert would be in
MemoryContextCreate.
 
+1 for adding the assertion to increase the chances of this bug being
caught by memory context infrastructure.

I had the following comment.

Why do we do this:
-       MemoryContext old_context;
+       MemoryContext old_context = CurrentMemoryContext;

Instead of implementing it as done in the previous version of this code, i.e.
old_context = MemoryContextSwitchTo(cmd_context);
 
Thank you,
Rahila Syed
 

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