Re: Don't deform column-by-column in composite_to_json

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Don't deform column-by-column in composite_to_json
Дата
Msg-id 28893.1549470667@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Don't deform column-by-column in composite_to_json  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-02-05 22:53:37 -0300, Alvaro Herrera wrote:
>> Isn't this putting much more than needed in the stack?  Seems like we
>> could just allocate tupdesc->natts members dynamically.  Not sure if we
>> care: it's about 12 kB; maybe considering palloc overhead, using the
>> stack is better.

> "it" being allocating values/nulls on the stack? I think there's plenty
> of places that do that. But it's also worth considering whether the
> relevant piece of code calls more deeply into other code, in which case
> the stack usage might be more problematic.

I think it's OK as long as there's a stack depth check here or somewhere
real close by.

            regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Too rigorous assert in reorderbuffer.c
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: bug tracking system