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>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2022-01-08T04:00:00Z
Lists: pgsql-bugs
07.01.2022 09:15, Etsuro Fujita wrote:
> On Mon, Jan 3, 2022 at 4:00 AM Alexander Lakhin <exclusion@gmail.com> wrote:
>
>> propose a simple test case for the issue. Maybe you will find it useful.
> Thanks, but in my environment, the test case doesn’t cause any
> failure. 
It's interesting. I perform on REL_14_STABLE (61c8da50) the following:
wget
https://www.postgresql.org/message-id/attachment/129455/posgres_fdw.sql.patch
-O - | git apply
./configure --enable-debug --enable-cassert >/dev/null && make -j8
>/dev/null && make -j8 -C contrib >/dev/null && make check -C
contrib/postgres_fdw/
and get:
test postgres_fdw                 ... FAILED (test process exited with
exit code 2)     1116 ms

>  How about something like the attached, which is made by
> modifying the original test case to avoid the connection-limit-error
> issue.  In the attached, I also added a comment to a function to match
> other places.
Your modified test fails with unpatched postgres_fdw.c too (as
expected). I would prefer your test as more elaborated.

Best regards,
Alexander



Commits

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

  2. Add support for asynchronous execution.