Andres Freund <and...@anarazel.de> writes: > Another avenue could be to make ParseFuncOrColumn et al use less stack, > and hope that it avoids the problem. It's a bit insane that we use this > much.
That would only reduce the chance of getting a stack overflow there, and not by that much, especially not for a CLOBBER_CACHE_ALWAYS animal which is going to be doing catalog accesses inside there too. > We don't have to go there in this case, but I've before wondered about > adding helpers that use an on-stack var for small allocations, and falls > back to palloc otherwise. Something boiling down to: Seems like that adds a lot of potential for memory leakage? regards, tom lane