When running GPCOPY, the job may fail during the copy process with errors similar to the following:
...Finished task XXXX with error: failed to select from pg_temp.gpcopy_call_pg_dump_db5aa886b3f744b98dbd0c0096765bb0 in RemoteDumpRelations(), error: ERROR: external table gpcopy_call_pg_dump_db5aa886b3f744b98dbd0c0096765bb0 command ended with error.
pg_dump: role with OID 123456789 does not exist (SQLSTATE 38000),
or
... Finished task XXXXX with error:
failed to dump metadata from XXXX:XXX
Command:
pg_dump --gp-syntax -h XXXX -p XXX -U gpadmin -a -O -x -t '"XXX"."XXX"' 'XXX'
Error:
pg_dump: role with OID 123456789 does not exist
This issue is typically caused by catalog inconsistency in Greenplum Database.
Specifically:
Some database objects still reference a role OID that no longer exists in pg_authid
When pg_dump is invoked by GPCOPY, it fails while dumping those objects
Check whether the referenced role exists in the database:
SELECT oid, * FROM pg_authid WHERE oid = <OID>;
If no rows are returned, then we can confirm a catalog corruption/inconsistency in the cluster
Since this is a system catalog issue, remediation need be performed by the Tanzu Greenplum Support team, please:
Open a support ticket to the Tanzu Greenplum Support Team
When creating the ticket, attach the gpcheckcat output so support can:
Analyze the catalog inconsistency
Provide a safe remediation or workaround plan
Refer to the gpcheckcat documentation for details: https://techdocs.broadcom.com/us/en/vmware-tanzu/data-solutions/tanzu-greenplum/6/greenplum-database/utility_guide-ref-gpcheckcat.html
Example command: # gpcheckcat -p <PORT> <DBNAME>
DO NOT attempt to delete any catalog entries manually unless explicitly instructed by support
GPCOPY will continue to fail until the catalog inconsistency is resolved