David Rowley <dgrowle...@gmail.com> writes: > On Tue, 20 Feb 2024 at 05:26, Tomas Vondra > <tomas.von...@enterprisedb.com> wrote: >> Wouldn't it be simpler to just build the plan as we do now, and then >> have an expression_tree_walker that walks the complete plan top-down, >> inspects the nodes, enables JIT where appropriate and so on? That can >> have arbitrary context, no problem with that.
> Why walk the entire plan tree again to do something we could do when > building it in the first place? FWIW, I seriously doubt that an extra walk of the plan tree is even measurable compared to the number of cycles JIT compilation will expend if it's called. So I don't buy your argument here. We would be better off to do this in a way that's clean and doesn't add overhead for non-JIT-enabled builds. regards, tom lane