Re: BUG #17344: Assert failed on queiring async_capable foreign table with inheritance

Alexander Law <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: Etsuro Fujita <etsuro.fujita@gmail.com>, Dmitry Dolgov <9erthalion6@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-01-02T19:00:00Z
Lists: pgsql-bugs

Attachments

Hello Etsuro-san,
31.12.2021 10:36, Etsuro Fujita wrote:
> On Tue, Dec 28, 2021 at 10:14 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
>> The root cause of the
>> assertion failure in the first case might be something other than the
>> limitation.  I’ll look into this in more detail.
> To fix, I modified postgresReScanForeignScan() so that we always
> process a pending async request (if any) before restarting the foreign
> scan.  Attached is a patch for that.  I tested the patch with the
> first case, and it addresses the assertion failure.
Thanks for the fix! I can confirm that it eliminates the failure and
propose a simple test case for the issue. Maybe you will find it useful.

Best regards,
Alexander

Commits

  1. postgres_fdw: Fix handling of a pending asynchronous request in postgresReScanForeignScan().

  2. Add support for asynchronous execution.