BUG #16500: SQL Abend. select multi_key_columns_range_partition_table - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #16500: SQL Abend. select multi_key_columns_range_partition_table
Date
Msg-id 16500-d1613f2a78e1e090@postgresql.org
Whole thread Raw
Responses Re: BUG #16500: SQL Abend. select multi_key_columns_range_partition_table
List 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.
------------------------------


pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #16497: old and new pg_controldata WAL segment sizes areinvalid or do not match
Next
From: PG Bug reporting form
Date:
Subject: BUG #16501: Incorrect result. select multi_key_columns_range_partition_table