gpcopy with "validate count" option will fail for most randomly distributed table
search cancel

gpcopy with "validate count" option will fail for most randomly distributed table

book

Article ID: 296634

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

gpcopy with the "validate count" option may fail. The log only reports "validation failed for table xxx". From the master log, we can see gpcopy run below query to valid:
SELECT count(*) FROM ONLY ""public"".""tablename"" GROUP BY gp_segment_id ORDER BY gp_segment_id",

When one table is randomly distributed, the record count for each instance may not be the same between the source and destination cluster - in this case, gpcopy reports failure.

Environment

Product Version: 6.12

Resolution

It's better to not use the "validate count" option for randomly distributed tables. Also Jira MPP-31058 has been raised for this issue.