gpcopy hangs when using a table with a sequence defined
search cancel

gpcopy hangs when using a table with a sequence defined

book

Article ID: 381881

calendar_today

Updated On:

Products

VMware Tanzu Greenplum Greenplum VMware Tanzu Data Suite VMware Tanzu Data Suite Pivotal Data Suite Non Production Edition

Issue/Introduction

gpcopy hanging with the following on the master 

20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-Starting copy 2.7.0...
20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-Copy appname: gpcopy_202409291627
20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-'gpcopy' --dest-host 'desthost.amer.BC.com' --dest-mapping-file '/storage/issd1/saya/migration/pflex_mapping_file.out' --dest-port '5312' --dest-table 'testing_new.Schema_name.' --dest-user 'gpadmin' --include-table 'db_test.Schema_name./*/' --jobs '8' --on-segment-threshold '-1' --parallelize-leaf-partitions --source-host 'broadcom.com' --source-port '5311' --source-user 'gpadmin' --truncate --validate 'count'
20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-Initializing gpcopy
20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-Source cluster version: 6.26.2 build commit:609ff2bb9ccb7d393d772b29770e757dbd2ecc79
20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-Destination cluster version: 6.26.2 build commit:609ff2bb9ccb7d393d772b29770e757dbd2ecc79
20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-pg_dump (PostgreSQL) 9.4.26
20240929:16:27:09 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-pg_dumpall (PostgreSQL) 9.4.26
20240929:16:27:49 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-Start copying database "db_test"
20240929:16:27:54 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-[Worker 0] Start copying table "db_test"."Schema_name"."table_name" => "testing_new"."Schema_name"."BACKUP_SAS"
20240929:16:27:55 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-[Worker 5] Start copying table "db_test"."Schema_name"."jira_mart" => "testing_new"."Schema_name"."jira_mart"
20240929:16:27:55 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-[Worker 0] Validation of "db_test"."Schema_name"."table_name" => "testing_new"."Schema_name"."backup__20240920" successful
20240929:16:27:55 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-[Worker 0] [Progress: (0/1) DBs, (1/949) tables done] Finished copying table "db_test"."Schema_name"."table_name" => "testing_new"."Schema_name"."table_name"
...
20240929:16:38:02 gpcopy:gpadmin:broadcom.com:111111-[INFO]:-[Worker 1] [Progress: (0/1) DBs, (947/949) tables done] Finished copying table "db_test"."Schema_name"."cc_13067_opp_unity" => "testing_new"."Schema_name"."cc_13067_o
pp_unity"
[[INDEFINITE HANG]]

gpcopy process stays running on the master only, there are no gpcopy process left on the segment host.  From the logs a table was identified that failed.  When running a gpcopy for this table only, it triggered this error and then quit gracefully.

sql: Scan error on column index 0, name "name": converting NULL to string is unsupported

Cause

The issue happens when a column that references a sequence that has a complex expression like

 `B2B'::text || nextval('testseq'::regclass)`

If the column uses the more generic standard expression like `nextval('testseq'::regclass)`, gpcopy works fine

Resolution

This is a known issue and will be fixed in a future version of gpcopy as of Nov 2024. Please check the release notes for fix 33631

Open a support ticket with Broadcom Support and reference this article.