Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/backend/commands/copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/test/isolation2/expected/ao_unique_index.out
Original file line number Diff line number Diff line change
Expand Up @@ -390,20 +390,20 @@ 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'; <waiting ...>
-- 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"
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

Expand Down
6 changes: 3 additions & 3 deletions src/test/isolation2/expected/aocs_unique_index.out
Original file line number Diff line number Diff line change
Expand Up @@ -390,20 +390,20 @@ 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'; <waiting ...>
-- 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"
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

Expand Down
Loading