Re: BUG #17355: Server crashes on ExecReScanForeignScan in postgres_fdw when accessing foreign partition

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17355: Server crashes on ExecReScanForeignScan in postgres_fdw when accessing foreign partition
Date: 2022-01-06 09:56:01
Message-ID: CAPmGK14vYHWFLg=Lninw8W37gRsEzuwteemZfzkXqV8+g_qJ8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jan 6, 2022 at 5:25 PM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> When running the following script (with 20 concurrent insert/update/delete
> queries):
> cat << 'EOF' | psql postgres
> CREATE EXTENSION postgres_fdw;
>
> CREATE SERVER testserver1 FOREIGN DATA WRAPPER postgres_fdw;
> DO $d$
> BEGIN
> EXECUTE $$CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw
> OPTIONS (dbname '$$||current_database()||$$',
> port '$$||current_setting('port')||$$'
> )$$;
> END;
> $d$;
>
> CREATE USER MAPPING FOR CURRENT_USER SERVER loopback;
> CREATE TABLE async_pt (a int, b int) PARTITION BY RANGE (a);
> CREATE TABLE base_tbl2 (a int, b int);
> CREATE FOREIGN TABLE async_p2 PARTITION OF async_pt FOR VALUES FROM (2000)
> TO (3000)
> SERVER loopback OPTIONS (table_name 'base_tbl2');
> CREATE TABLE async_p3 PARTITION OF async_pt FOR VALUES FROM (3000) TO
> (4000);
> EOF
>
> for i in `seq 20`; do
> cat << 'EOF' | psql postgres >psql-$i.log &
> INSERT INTO async_pt SELECT i FROM generate_series(3000, 3100) i;
> DELETE FROM async_pt;
> UPDATE async_pt SET a = a;
> EOF
> done
> wait
>
> I get crashes with the following stacktrace:

I haven't tried to reproduce this yet, but I have one question: did
you set the async_capable option to true?

Thanks for the report!

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Lakhin 2022-01-06 12:00:00 Re: BUG #17355: Server crashes on ExecReScanForeignScan in postgres_fdw when accessing foreign partition
Previous Message PG Bug reporting form 2022-01-06 08:50:32 BUG #17356: hunspell-hu dictionary processing error