Re: BUG #16190: The usage of NULL pointer in refint.c

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #16190: The usage of NULL pointer in refint.c
Дата
Msg-id 20200107064412.GG2386@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #16190: The usage of NULL pointer in refint.c  (Andres Freund <andres@anarazel.de>)
Ответы Re: BUG #16190: The usage of NULL pointer in refint.c  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
On Mon, Jan 06, 2020 at 06:26:54PM -0800, Andres Freund wrote:
> On 2020-01-06 21:12:05 -0500, Tom Lane wrote:
>> WFM.  There are probably more elegant ways to do it than to drop this
>> stuff into TopMemoryContext, but this is surely better than unchecked
>> malloc calls.
>
> Yea, it's certainly better than the current situation. An incremental
> improvement would be to do the allocations in a separate contect, for easier
> debugging should there ever be a leak...

Sure.  I am not sure if that's worth the extra work though, so I would
just be tempted to commit the patch that moves the allocation to
TopMemoryContext and call it a day.  Any objections to that?
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833numrange query
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #16190: The usage of NULL pointer in refint.c