diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 4ccd3798067..9af00cf33e9 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -432,11 +432,6 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt, else *processed = CopyFrom(cstate); /* copy from file to database */ - /* Handle copy to replicated table returns processed number */ - if (Gp_role == GP_ROLE_DISPATCH && - GpPolicyIsReplicated(cstate->rel->rd_cdbpolicy)) - *processed = *processed / cstate->rel->rd_cdbpolicy->numsegments; - /* * Update view info if we actualy copy data from other place. */ diff --git a/src/test/isolation2/expected/ao_unique_index.out b/src/test/isolation2/expected/ao_unique_index.out index d737b1feedc..ea89389e841 100644 --- a/src/test/isolation2/expected/ao_unique_index.out +++ b/src/test/isolation2/expected/ao_unique_index.out @@ -390,12 +390,12 @@ CREATE 1: BEGIN; BEGIN 1: COPY unique_index_ao_row FROM PROGRAM 'seq 1 10'; -COPY 10 +COPY 30 -- concurrent tx inserting conflicting row should block. 2&: COPY unique_index_ao_row FROM PROGRAM 'seq 1 1'; -- concurrent tx inserting non-conflicting rows should be successful. 3: COPY unique_index_ao_row FROM PROGRAM 'seq 11 20'; -COPY 10 +COPY 30 -- inserting a conflicting row in the same transaction should ERROR out. 1: COPY unique_index_ao_row FROM PROGRAM 'seq 1 1'; ERROR: duplicate key value violates unique constraint "unique_index_ao_row_a_key" @@ -403,7 +403,7 @@ DETAIL: Key (a)=(1) already exists. CONTEXT: COPY unique_index_ao_row, line 1 -- now that tx 1 was aborted, tx 2 is successful. 2<: <... completed> -COPY 1 +COPY 3 1: END; END diff --git a/src/test/isolation2/expected/aocs_unique_index.out b/src/test/isolation2/expected/aocs_unique_index.out index 88a81e3220a..1c3efd3794c 100644 --- a/src/test/isolation2/expected/aocs_unique_index.out +++ b/src/test/isolation2/expected/aocs_unique_index.out @@ -390,12 +390,12 @@ CREATE 1: BEGIN; BEGIN 1: COPY unique_index_ao_column FROM PROGRAM 'seq 1 10'; -COPY 10 +COPY 30 -- concurrent tx inserting conflicting row should block. 2&: COPY unique_index_ao_column FROM PROGRAM 'seq 1 1'; -- concurrent tx inserting non-conflicting rows should be successful. 3: COPY unique_index_ao_column FROM PROGRAM 'seq 11 20'; -COPY 10 +COPY 30 -- inserting a conflicting row in the same transaction should ERROR out. 1: COPY unique_index_ao_column FROM PROGRAM 'seq 1 1'; ERROR: duplicate key value violates unique constraint "unique_index_ao_column_a_key" @@ -403,7 +403,7 @@ DETAIL: Key (a)=(1) already exists. CONTEXT: COPY unique_index_ao_column, line 1 -- now that tx 1 was aborted, tx 2 is successful. 2<: <... completed> -COPY 1 +COPY 3 1: END; END