Re: Asynchronous Append on postgres_fdw nodes.

Etsuro Fujita <etsuro.fujita@gmail.com>

From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: "movead.li@highgo.ca" <movead.li@highgo.ca>
Cc: Horiguchi <horikyota.ntt@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, "Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru>, Ahsan Hadi <ahsan.hadi@gmail.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-01-02T08:15:59Z
Lists: pgsql-hackers
On Sun, Dec 20, 2020 at 5:15 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> On Thu, Nov 26, 2020 at 10:28 AM movead.li@highgo.ca
> <movead.li@highgo.ca> wrote:
> > Issue one:
> > Get a Assert error at 'Assert(bms_is_member(i, node->as_needrequest));' in
> > ExecAppendAsyncRequest() function when I use more than two foreign table
> > on different foreign server.
> >
> > I research the code and do such change then the Assert problom disappear.
>
> Could you show a test case causing the assertion failure?

I happened to reproduce the same failure in my environment.

I think your change would be correct, but I changed the patch so that
it doesn’t need as_lastasyncplan anymore [1].  The new version of the
patch works well for my case.  So, could you test your case with it?

Best regards,
Etsuro Fujita

[1] https://www.postgresql.org/message-id/CAPmGK17L0j6otssa53ZvjnCsjguJHZXaqPL2HU_LDoZ4ATZjEw%40mail.gmail.com



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.