On 5/2/18 12:30, Tom Lane wrote:
> I'm not particularly. It seems impossible that _SPI_stack could grow
> faster than the machine's actual stack, which would mean (on typical
> setups) that you couldn't get more than perhaps 10MB of _SPI_stack
> before hitting a stack-overflow error. That's a lot by some measures,
> but I don't think it's enough to cripple anything if we don't free it.
>
> Also, if someone is routinely using pretty deep SPI nesting, they'd
> probably be happier that we do keep the stack rather than repeatedly
> creating and enlarging it.
Yes, that was the idea. Here is an adjusted patch.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services