Pivotal Knowledge Base


gptransfer Fails with "too many values to unpack" due to period (.) in the table name


Pivotal Greenplum (GPDB) below


gptransfer utility fails with the error message "too many values to unpack".

Error Message

20140801:12:37:32:013593 gptransfer:mdw:gpadmin-[INFO]:-Retrieving configuration of destination Greenplum Database...
20140801:12:37:32:013593 gptransfer:mdw:gpadmin-[INFO]:-Retrieving list of source tables...
20140801:12:37:32:013593 gptransfer:mdw:gpadmin-[CRITICAL]:-gptransfer failed. (Reason='too many values to unpack') exiting...

Another variant of this error is:

Traceback (most recent call last):
  File "/usr/local/GP-", line 279, in simple_main_locked
    commandObject = createCommandFn(options, args)
  File "/usr/local/GP-", line 2154, in __init__
    self._options.source_port, self._options.source_user)
  File "/usr/local/GP-", line 608, in get_user_tables
    (schema, table) = row[0].split('.')
ValueError: too many values to unpack


The error is being printed due to failure from the below line of code of gptransfer , it attempts to splits the schemaname and table name separately with "." as its delimiter.

 607         for row in cur:
 608             (schema, table) = row[0].split('.')
 609             external = (row[1] == 'x')
 610             all_tables.add(GpTransferTable(database, schema, table, externa     l))
 611         cur.close()

But if there is a period or "." in the table name , the gptransfer fails to understand this and hence the issue

Use the below query to check if there any table name with periods or "." associated with its name in the source database

select relname from pg_class where relname like '%.%';


Upgrade to where the issue is fixed.


Rename the table name to something that doesn't have a period in its name.

alter table < schema-name >.< table-name > rename to < new-table-name >;


Powered by Zendesk