When running gpcopy you might receive an error similar to the one below:
$ gpcopy --include-table 'testdb.public.big_table_24246' \
> --dest-table 'testdb.public.big_table_24246' --dest-host 192.168.6.200 --dest-port 5432 --dest-user gpadmin \
> --source-host 192.168.6.198 --source-port 5432 --source-user gpadmin --drop
...
failed to dump metadata from 192.168.6.198:5432.
Command:
pg_dump --gp-syntax -h 192.168.6.198 -p 5432 -U gpadmin -s -t '"public"."big_table_24246"' 'testdb'
Error:
pg_dump: [archiver (db)] query failed: ERROR: relation "pg_opfamily" does not exist
pg_dump: [archiver (db)] query was: SELECT classid, objid, refclassid, refobjid, deptype FROM pg_depend WHERE deptype != 'p' AND deptype != 'e'
This issue has only been observed when migrating data from Greenplum Database (GPDB) GPDB 4.x to GPDB 6.x.
The error is due to gpcopy utility being run on the on the GPDB 6.x cluster/destination cluster.
As per the documentation mentioned, when migrating data from GPDB 4 or GPDB 5 to GPDB 6, you must run gpcopy utility on the GPDB 4 or Greenplum 5 cluster.
Documentation: Migrating Data from Greenplum 4.3 or 5 to Greenplum 6
If you use gpcopy to migrate data, initiate the gpcopy operation from the Greenplum 4.3.26 (or later) or the 5.9 (or later) cluster. See Migrating Data with gpcopy for more information.
Run the same gpcopy command on GPDB 4 or GPDB 5 cluster.