Re: Defer selection of asynchronous subplans until the executor initialization stage - Mailing list pgsql-hackers

From Andrey Lepikhov
Subject Re: Defer selection of asynchronous subplans until the executor initialization stage
Date
Msg-id edb1331c-e861-0c53-9fdb-f7ca7dfd884d@postgrespro.ru
Whole thread Raw
In response to Re: Defer selection of asynchronous subplans until the executor initialization stage  (Zhihong Yu <zyu@yugabyte.com>)
Responses Re: Defer selection of asynchronous subplans until the executor initialization stage  (Etsuro Fujita <etsuro.fujita@gmail.com>)
List pgsql-hackers
On 11/5/21 06:55, Zhihong Yu wrote:
> On Mon, May 10, 2021 at 8:45 PM Andrey Lepikhov 
> <a.lepikhov@postgrespro.ru <mailto:a.lepikhov@postgrespro.ru>> 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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: cleaning up PostgresNode.pm
Next
From: Takashi Menjo
Date:
Subject: Re: Map WAL segment files on PMEM as WAL buffers