чт, 8 окт. 2026 г. в 13:08, David Rowley <dgrowleyml(at)gmail(dot)com>:
> On Fri, 2 Oct 2026 at 05:16, Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com> wrote:
> > Skip InitExecPartitionPruneContexts() when es_epq_active is set. A
> > case is added to eval-plan-qual.
>
> uhh, that's a pretty horrible fix. So partition pruning needs to know
> what EPQ is now?
>
> I think it would be much better to fix with the attached, which adds
> an "initialized" flag to the PartitionPruneState.
>
>
Hi David!
Thanks for the review.
Agreed. Skipping on es_epq_active was answering the wrong question.
The invariant is that InitExecPartitionPruneContexts() must not run
twice on a shared PartitionPruneState.
Your initialized flag is the right fix.
LGTM
--
Regards,
Rachitskiy Andrey