On Tue, 15 Oct 2024 at 05:21, Alena Rybakina <a.rybakina@postgrespro.ru> wrote:
> As I see it, node->eflags can be zero if it passes the output of a
> subquery, during the initialization of the Material node execution, and
> when the subquery is rescanned.
Do you have a test case that calls Material with zero eflags? I tried
adding Assert(node->eflags != 0) to ExecMaterial() and nothing failed.
It would be good to know if the optimisation added in d2c555ee5 ever
applies with today's code. If it does apply, we should likely add a
test case for it and if it never does, then we should just remove the
optimisation and always create the tuplestore when it's NULL.
David