Re: BUG #18806: When enable_rartitionwise_join is set to ON, the database shuts down abnormally

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: m_lingbin(at)126(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18806: When enable_rartitionwise_join is set to ON, the database shuts down abnormally
Date: 2025-02-12 09:48:53
Message-ID: CAHewXNmUpmoqacgq40_s5sEfxtHVN3rndOSwkAtr5=dMQYzQLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Álvaro Herrera 2025-02-12 10:55:43 Re: BRIN index creation on geometry column causes crash
Previous Message weijie JL 2025-02-12 08:55:49 Fwd: BUG #18805: A specific query on a hash partitioned table always causes a "signal 11: Segmentation fault" error.