Re: The case when AsyncAppend exists also in the qual of Async ForeignScan

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: The case when AsyncAppend exists also in the qual of Async ForeignScan
Date: 2021-07-08 07:49:39
Message-ID: CAPmGK15nLigSkr_kSiRmxn4vUv_EC4GAZ-veiUQ8UviDdF2Y3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Jul 3, 2021 at 8:35 AM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> On Fri, Jul 2, 2021 at 10:24 PM Andrey Lepikhov
> <a(dot)lepikhov(at)postgrespro(dot)ru> wrote:
> > I found one bug. Look at the case:
> >
> > CREATE TABLE test (x int) PARTITION BY HASH (x);
> > CREATE TABLE test_1 (x int);
> > CREATE TABLE test_2 (x int);
> > CREATE FOREIGN TABLE ftest_1 PARTITION OF test
> > FOR VALUES WITH (modulus 2, remainder 0)
> > SERVER loopback OPTIONS (table_name 'test_1');
> > CREATE FOREIGN TABLE ftest_2 PARTITION OF test
> > FOR VALUES WITH (modulus 2, remainder 1)
> > SERVER loopback2 OPTIONS (table_name 'test_2');
> > INSERT INTO test (SELECT * FROM generate_series(1,10));
> > ANALYZE test,test_1,test_2,ftest_1,ftest_2;
> >
> > EXPLAIN (ANALYZE)
> > SELECT * FROM test WHERE x NOT IN (
> > SELECT avg(x) FROM test WHERE x > 10
> > );
> > ERROR: InstrEndLoop called on running node
> >
> > When I added ', COSTS OFF, SUMMARY OFF, TIMING OFF' this example fall
> > down into the SEGFAULT.
> >
> > I prepared quick fix for this problem (see patch in attachment). Maybe
> > it is'nt a best solution but it can speedup search of it.
>
> I’ll looking into this. Thanks for the report and patch!

I tried to reproduce this in my environment using HEAD and PG14, but I
couldn't. Could you elaborate a bit more on how to reproduce this?

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Gustafsson 2021-07-08 07:53:11 Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x
Previous Message Guillaume Lelarge 2021-07-08 07:49:17 Re: BUG #17091: Cannot install with EDB installer when username contains diacritics