Re: BUG #18806: When enable_rartitionwise_join is set to ON, the database shuts down abnormally
Tender Wang <tndrwang@gmail.com>
From: Tender Wang <tndrwang@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: m_lingbin@126.com, pgsql-bugs@lists.postgresql.org
Date: 2025-02-12T09:48:53Z
Lists: 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
Commits
-
Fix freeing a child join's SpecialJoinInfo
- 727bc6ac33f6 17.5 landed
- c39392ebaeef 18.0 landed
-
Reduce memory used by partitionwise joins
- 5278d0a2e870 17.0 cited