Re: Missing pfree in logical_heap_rewrite_flush_mappings()

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Missing pfree in logical_heap_rewrite_flush_mappings()
Дата
Msg-id 20140423081123.GH4449@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Missing pfree in logical_heap_rewrite_flush_mappings()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2014-04-22 22:37:37 -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > I had to revert this patch.  It causes a failure in the
> > /contrib/test_decoding regression test.
> 
> On closer inspection, it was simply pfree'ing the wrong pointer.

Thanks for fixing.

> I fixed that and also undid the allocation in a different memory
> context, which didn't seem to be a particularly good idea, unless
> you've got a specific reason why CurrentMemoryContext would be the
> wrong place for a transient allocation.

That should be fine. I don't see any reason not to use palloc.
logical_rewrite_log_mapping() has to allocate longer living memory, I
guess it was copied from there.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: What use case is make_tuple_indirect() supposed to illustrate?
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)