COPY ... ON SEGMENT on REPLICATED tables: FROM returns N× in Greenplum but only 1× in Cloudberry
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 247
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 39
Description
```sql
-- Cloudberry cluster with 4 segments
-- Greenplum cluster with 4 segments
create table tab_replicated(a int, b int, c int) distributed replicated;
insert into tab_replicated select i, i, i from generate_series(1, 100) i;
copy tab_replicated to '/home/cbdb/tab_replicated_.txt' on segment;
-- Greenplum: COPY 400 | Cloudberry: COPY 400
create table tab_replicated_new(a int, b int, c int) distributed replicated;
copy tab_replicated_new from '/home/cbdb/tab_replicated_.txt' on segment;
-- Greenplum: COPY 400 | Cloudberry: COPY 100 (unexpected)
```
Contributor guide
Research direction
Reproduce the SQL example on four-segment Cloudberry and Greenplum clusters, focusing on COPY ... FROM ... ON SEGMENT for replicated tables. Compare the reported row counts and trace the implementation of this COPY path; done means Cloudberry returns COPY 400, matching Greenplum.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql, sql
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100