Pivotal Knowledge Base

Follow

gpexpand failed: Invalid input file: Expansion segments have incorrect dbids

Environment

Product Version
Pivotal Greenplum (GPDB) 4.3.x
OS RHEL 6.x
Others  

Symptom

When attempting a GPDB cluster expansion gpexpand failed with "Invalid input file: Expansion segments have incorrect dbids"

Error Message:

20160829:01:51:07:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.8.1 build 1'
20160829:01:51:07:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.8.1 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Apr 20 2016 08:08:56'
20160829:01:51:08:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state
20160829:01:51:12:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Readying Greenplum Database for a new expansion
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database gpadmin for unalterable tables...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database postgres for unalterable tables...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database gpperfmon for unalterable tables...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database template1 for unalterable tables...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database security for unalterable tables...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database roletrial for unalterable tables...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database itrc for unalterable tables...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database gpadmin for tables with unique indexes...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database postgres for tables with unique indexes...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database gpperfmon for tables with unique indexes...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database template1 for tables with unique indexes...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database security for tables with unique indexes...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database roletrial for tables with unique indexes...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Checking database itrc for tables with unique indexes...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Tables with unique indexes exist. Until these tables are successfully
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-redistributed, unique constraints may be violated. For more information
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-on this issue, see the Greenplum Database Administrator Guide
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[ERROR]:-gpexpand failed: Invalid input file: Expansion segments have incorrect dbids Exiting...
20160829:01:53:51:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Bringing Greenplum Database back online...
20160829:01:54:18:026841 gpexpand:alcymst-as-01p:gpadmin-[INFO]:-Shutting down gpexpand...

Cause

In the early stage gpexpand will check DBID in the specified input file should meet following requirements.

1. Minimum of DBID in gpexpand input file should be 1 greater than maximum of DBID in existing GPDB system

2. Ordered DBID in input file should be continuous number (e.g. 33,34,35, ...)

In this case, the first time of executing gpexpand with an input file failed because of a problem with restarting standby master (due to out-of-sync with master). Then standby master was removed from cluster and gpexpand was run again with same input file. As DBID of the removed standby master is the maximum one in existing system the subsequent gpexpand determined the entries in previous input file break rule 1 as mentioned above. And it aborted with error "Invalid input file: Expansion segments have incorrect dbids". 

Resolution

There are two solutions to solve this problem.

  1. Generate gpexpand input file again after standby master is taken out of cluster. Then use the new input file to expand system
  2. Initialize standby master first then use the previously generated input file to run gpexpand

Additional Information

Expanding a Greenplum System

 

Comments

Powered by Zendesk