Hi, On 2026-09-01 19:53:05 +0000, Floris Van Nee wrote: > I am not sure what the right fix is. CHECK_FOR_INTERRUPTS() in > expression_tree_walker_impl()/expression_tree_mutator_impl() and > copyObjectImpl() would cover it, but those are relatively hot; an > amortised check every N nodes would be cheaper.
I think we'd need a separation between the function to start initiating a tree walk/mutation and the function called for every recursion level. Then we can do the CFI() in the "start a tree walk" function, without having to do it the expression_tree_walker_impl(), once per processed node. > Separately, nothing bounds planner memory in aggregate, so there is no > ceiling short of the OOM killer -- but that seems like its own thread. That's a ginormous topic, with lots of work needed to get anywhere. Greetings, Andres Freund
