Pivotal Knowledge Base

Follow

gptransfer fails with "too many values to unpack" due to inconsistent index on gp_distribution_policy

Problem

gptransfer fails with error " Reason='too many values to unpack' "

20140705:18:39:45:009134 gptransfer:tla1355:gpadmin-[INFO]:-Retrieving list of source tables...
20140705:18:39:46:009134 gptransfer:tla1355:gpadmin-[CRITICAL]:-gptransfer failed. (Reason='too many values to unpack') exiting...

The master log states its failing for below query run by gptransfer

2014-07-05 18:39:46.666544 UTC,"root","eos2",p4206,th205350656,"10.5.4.54","63354",2014-07-05 18:39:46 UTC,864157902,con102481,cmd5,seg-1,,dx166706,x864157902,sx1,"LOG","00000",
"statement: 
SELECT
    n.nspname || '.' || c.relname as fq_name, c.relstorage
FROM
    pg_class c JOIN pg_namespace n ON (c.relnamespace=n.oid)
    JOIN pg_catalog.gp_distribution_policy p on (c.oid = p.localoid)
WHERE
    c.oid NOT IN ( SELECT parchildrelid as oid FROM pg_partition_rule )
AND n.nspname NOT IN ('gpexpand', 'pg_bitmapindex', 'information_schema', 'gp_toolkit');",,,,,,"

Cause

The index on the gp_distribution_policy might be inconsistent

Solution

1. Check duplicate keys in gp_distribution_policy table.

  psql> select localoid,count(*) from gp_distribution_policy where localoid in (select oid from pg_class) group by 1 having count(*) > 1;

2. Reindex gp_distribution_policy table if returned more than one distribution policy returned.

  psql> REINDEX table gp_distribution_policy;

3. Check duplicate keys in gp_distribution_policy.

  psql> select localoid,count(*) from gp_distribution_policy where localoid in (select oid from pg_class) group by 1 having count(*) > 1;

Comments

Powered by Zendesk