Andres Freund <and...@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