Re: Defer selection of asynchronous subplans until the executor initialization stage

Andrei Lepikhov <a.lepikhov@postgrespro.ru>

From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Etsuro Fujita <etsuro.fujita@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-11T07:06:05Z
Lists: pgsql-hackers
On 11/5/21 08:55, Zhihong Yu wrote:
> +           /* Check to see if subplan can be executed asynchronously */
> +           if (subplan->async_capable)
> +           {
> +               subplan->async_capable = false;
> 
> It seems the if statement is not needed: you can directly assign false 
> to  subplan->async_capable.Thank you, I agree with you.
Close look into the postgres_fdw regression tests show at least one open 
problem with this approach: we need to control situations when only one 
partition doesn't pruned and append isn't exist at all.

-- 
regards,
Andrey Lepikhov
Postgres Professional



Commits

  1. Improve comments for trivial_subqueryscan().

  2. Disable asynchronous execution if using gating Result nodes.

  3. Allow asynchronous execution in more cases.

  4. Doc: Further update documentation for asynchronous execution.

  5. Fix rescanning of async-aware Append nodes.

  6. Doc: Update documentation for asynchronous execution.

  7. Fix EXPLAIN ANALYZE for async-capable nodes.

  8. Minor code cleanup in asynchronous execution support.

  9. Adjust input value to WaitEventSetWait() in ExecAppendAsyncEventWait().

  10. Add support for asynchronous execution.