Skip to content

[Bug] COPY FROM crash on partition tables with partitions > 32 and data of special order #547

@avamingli

Description

@avamingli

Cloudberry Database version

                                                                                                          version

-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
 PostgreSQL 14.4 (Cloudberry Database 1.5.4+dev.106.g057f9d27525 build dev) on x86_64-pc-linux-gnu, compiled by gcc (Ub
untu 11.3.0-1ubuntu1~22.04.1) 11.3.0, 64-bit compiled on Jul 31 2024 17:59:22 (with assert checking)
(1 row)

What happened

COPY FROM coredump as:
img_v3_02da_4f85f0ef-4f4f-43a5-8cf5-40ad52a6883g

What you think should happen instead

No response

How to reproduce

  1. prepare a data file:
for i in {1..967}; do echo 2, 1 >> /tmp/a.csv;done
for i in {1..33}; do echo 2, $i >> /tmp/a.csv;done
echo 2, 1 >> /tmp/a.csv
  1. create a partitioned table with more than 32 partitions:
create table px(a int, b int) partition by range(b) (start(1) end(34) every(1)) using ao_column distributed by (a);
CREATE TABLE
  1. COPY FROM the data file
copy px from '/tmp/a.csv' (format csv);
ERROR:  MPP detected 1 segment failures, system is reconnected

then will see a coredump file on segment 0

Operating System

Ubuntu

Anything else

No response

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

type: BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions