Hi, On 2020-04-22 13:46:22 -0400, Robert Haas wrote: > On Wed, Apr 22, 2020 at 1:18 PM Alvaro Herrera <alvhe...@2ndquadrant.com> > wrote: > > Well, I was actually thinking in building ready-made execution trees, > > bypassing the planner altogether. But apparently no one thinks that > > this is a good idea, and we don't have any code that does that already, > > so maybe it's not a great idea.
I was commenting on what I understood Corey to say, but was fairly unclear about it. But I'm also far from sure that I understood Corey correctly... > If it's any consolation, I had the same idea very recently while > chatting with Amit Langote. Maybe it's a bad idea, but you're not the > only one who had it. :-) That seems extremely hard, given our current infrastructure. I think there's actually a good case to be made for the idea in the abstract, but ... The amount of logic the ExecInit* routines have is substantial, the state they set up ss complicates. A lot of nodes have state that is private to their .c files. All executor nodes reference the corresponding Plan nodes, so you also need to mock up those. Greetings, Andres Freund