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

Etsuro Fujita <etsuro.fujita@gmail.com>

From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Alexander Pyhalov <a.pyhalov@postgrespro.ru>, "Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2022-04-25T04:29:16Z
Lists: pgsql-hackers

Attachments

Hi,

On Wed, Apr 20, 2022 at 2:04 AM Zhihong Yu <zyu@yugabyte.com> wrote:
> It is okay to keep the formation in your patch.

I modified mark_async_capable_plan() a bit further; 1) adjusted code
in the ProjectionPath case, just for consistency with other cases, and
2) tweaked/improved comments a bit.  Attached is a new version of the
patch (“prevent-async-2.patch”).

As mentioned before, v14 has the same issue, so I created a fix for
v14, which I’m attaching as well (“prevent-async-2-v14.patch”).  In
the fix I modified is_async_capable_path() the same way as
mark_async_capable_plan() in HEAD, renaming it to
is_async_capable_plan(), and updated some comments.

Barring objections, I’ll push/back-patch these.

Thanks!

Best regards,
Etsuro Fujita

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.