Re: BUG #18806: When enable_rartitionwise_join is set to ON, the database shuts down abnormally - Mailing list pgsql-bugs

From Tender Wang
Subject Re: BUG #18806: When enable_rartitionwise_join is set to ON, the database shuts down abnormally
Date
Msg-id CAHewXNmUpmoqacgq40_s5sEfxtHVN3rndOSwkAtr5=dMQYzQLA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18806: When enable_rartitionwise_join is set to ON, the database shuts down abnormally  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-bugs


Laurenz Albe <laurenz.albe@cybertec.at> 于2025年2月12日周三 15:38写道:
On Wed, 2025-02-12 at 07:01 +0000, PG Bug reporting form wrote:
> PostgreSQL version: 17.2
> Operating system:   CentOS Linux release 7.9.2009 (Core)
> Description:       
>
> After upgrading PG17.2, testing found that when enable_rartitionwise_join is
> set to ON, when executing a query, if the main query and subquery have the
> same table, the query will report an error.
>
> The database log shows the following error:
> LOG:  server process (PID 24796) was terminated by signal 6: Aborted
> DETAIL:  Failed process was running: select * from test t join orders o on
> t.order_id =o.order_id where t.order_id in (select order_id from orders);
> LOG:  terminating any other active server processes

That is a crash that may well indicate a PostgreSQL bug.

However, without a way to reproduce the behavior, we won't be able to fix
the problem.  Try to come up with a self-contained test case.  It would
also be interesting to know which PostgreSQL extensions are present.

 
I can reproduce this crash on HEAD.

postgres=# create table test(order_id int, name varchar);
create table orders(order_id int, name char(10)) partition by hash (order_id);
CREATE TABLE
CREATE TABLE
postgres=# set enable_partitionwise_join = on;
SET
postgres=# create table orders_p1 partition of orders for values with ( modulus 32, remainder 0);
CREATE TABLE
postgres=# explain select * from test t join orders o on
t.order_id =o.order_id where t.order_id in (select order_id from orders);
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.



--
Thanks,
Tender Wang

pgsql-bugs by date:

Previous
From: 孟令彬
Date:
Subject: Re:Re: BUG #18806: When enable_rartitionwise_join is set to ON, the database shuts down abnormally
Next
From: Floris Van Nee
Date:
Subject: Error for GRANTED BY in PG16&PG17 that does not happen in PG15