On 11/5/21 06:55, Zhihong Yu wrote:
> On Mon, May 10, 2021 at 8:45 PM Andrey Lepikhov
> <[email protected] <mailto:[email protected]>> wrote:
> It seems the if statement is not needed: you can directly assign false
> to subplan->async_capable.
I have completely rewritten this patch.
Main idea:
The async_capable field of a plan node inform us that this node could
work in async mode. Each node sets this field based on its own logic.
The actual mode of a node is defined by the async_capable of PlanState
structure. It is made at the executor initialization stage.
In this patch, only an append node could define async behaviour for its
subplans.
With such approach the IsForeignPathAsyncCapable routine become
unecessary, I think.
--
regards,
Andrey Lepikhov
Postgres Professional