Re: BUG #16807: Assert failed in postgres_fdw/estimate_path_cost_size with an empty foreign table

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: exclusion(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16807: Assert failed in postgres_fdw/estimate_path_cost_size with an empty foreign table
Date: 2021-01-06 03:15:38
Message-ID: CAPmGK17nuChuVAe0wr_51OxxLewbZdefwYNNF=wNVGjLcTwADQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jan 6, 2021 at 3:29 AM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 16807
> Logged by: Alexander Lakhin
> Email address: exclusion(at)gmail(dot)com
> PostgreSQL version: 13.1
> Operating system: Ubuntu 20.04
> Description:
>
> When executing the following query:
> CREATE EXTENSION 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 t1 (c1 int NOT NULL);
> CREATE FOREIGN TABLE ft1 (c1 int NOT NULL) SERVER loopback OPTIONS
> (schema_name 'public', table_name 't1');
>
> INSERT INTO t1 SELECT id FROM generate_series(1, 100) id;
> DELETE FROM t1;
>
> ANALYZE ft1;
>
> EXPLAIN
> SELECT t1.c1, t2.c1 FROM ft1 t1 JOIN ft1 t2 ON (t1.c1 = t2.c1) ORDER BY
> t1.c1, t2.c1;
>
> The assert-enabled server crashes with the stacktrace:

Reproduced. Will look into this closely.

Thanks for the report, Alexander!

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-01-06 03:25:26 BUG #16808: Postgres Windows installer fails with unknown error and terminates
Previous Message Kasahara Tatsuhito 2021-01-06 02:13:35 Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.