BUG #16500: SQL Abend. select multi_key_columns_range_partition_table
The Post Office <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: hisanori.kobayashi.bp@nttdata.com
Date: 2020-06-18T09:35:27Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 16500
Logged by: Kobayashi Hisanori
Email address: hisanori.kobayashi.bp@nttdata.com
PostgreSQL version: 12.2
Operating system: Windows10
Description:
I found that abend(crash) sql.
select ... from multi_key_columns_range_partition_table
where key_col1 <= xxx and key_col2 = yyy ;
Same for 12.2 and 12.3
I am not good at English, so I will send a reproduction script.
------------------------------
-- ***** execute from psql
--
-- ***** Create Test Table
drop table if exists pt_test01 ;
create table pt_test01
( kbn smallint not null
, nen char(4) not null
, mm char(2) not null
, cd char(3) not null
, val00 numeric(15, 3)
, usr varchar(10)
)
partition by range(kbn, nen) with (oids=false)
;
create table pt_test01_1_2019 partition of pt_test01 for values from (1,
'2019') to (1, '2020') ;
create table pt_test01_1_2020 partition of pt_test01 for values from (1,
'2020') to (1, '2021') ;
create table pt_test01_2_2019 partition of pt_test01 for values from (2,
'2019') to (2, '2020') ;
create table pt_test01_2_2020 partition of pt_test01 for values from (2,
'2020') to (2, '2021') ;
--
-- ***** Test SQL
select * from pt_test01 where kbn <= 1 and nen = '2020' ;
--
-- ***** Result:ABEND/Connection Closed
-- ***** Message(Japanese)
-- サーバとの接続が想定外にクローズされました
-- おそらく要求の処理前または処理中にサーバが異常終了
-- したことを意味しています。
-- サーバへの接続が失われました。リセットしています: 失敗。
-- ***** Google translation
-- The connection with the server was closed unexpectedly
-- Server crashed, probably before or during processing of the
request
-- It means that you have done it.
-- The connection to the server has been lost. Resetting: failed.
------------------------------
Commits
-
Fix some issues with step generation in partition pruning.
- bead29decf90 11.9 landed
- 62c4a77295ec 12.4 landed
- cebe10a5f307 13.0 landed
- 13838740f61f 14.0 landed