Skip to content

[Bug] AO tables didn't switch seg file when bulk insertion: COPY #529

Description

@avamingli

Cloudberry Database version

Cloudberry Database 1.5.4+dev.85.g566f6348c1c build dev

What happened

As title.

What you think should happen instead

No response

How to reproduce

prepare a csv file with some data:

foriin {1..100};doecho$i, $i, $i>> /var/crash/a.csv;done
createtableao1(a int, b int, c int) using ao_column;
select segfilecount from pg_appendonly where relid ='ao1'::regclass;
segfilecount
--------------0
(1 row)
set gp_appendonly_insert_files_tuples_range =1;
COPY ao1 from'/var/crash/a.csv' csv;
COPY 100
analyze ao1;
select segfilecount from pg_appendonly where relid ='ao1'::regclass;
segfilecount
--------------1
(1 row)
show gp_appendonly_insert_files;
gp_appendonly_insert_files
----------------------------4
(1 row)

There should be 4 segfilecount of ao1 as we aim to switch one file one tuple.

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

No one assigned

    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