Pivotal Greenplum Database (GPDB)
This article will cover the steps required for performing recovery for the segments which are currently marked down.
For more details on performing analysis, why the segments went down please refer to the link, Analysis before recovering segments
Note- All the below commands are required to be run from the master server as gpadmin user.
- Identify the segments which are currently marked down
- Initiate incremental recover or full recovery depending on the requirement, prefer running incremental recovery first and if it fails then you would need to review the segment logs to understand the cause of recovery failure and decide if full recovery is required.
gprecoverseg -a ( Incremental recovery)
gprecoverseg -aF (Full recovery)
- The above command will return the control to the user, usually, it should occur in around 10-15 minutes or even less. However, if there is a high amount of change tracking logs or a huge number of create/drop/alter statement have been performed on the database since the mirror was down, it can take time.
- Once the control is returned, you can view the progress of resynchronization activity using:
- (Optional) If gpstate -e reports that there are segments which switched mirror roles, you will need to run a rebalance operation to bring the segments into their preferred state.
Note- HAWQ does not have mirrors, so this step is only applicable for GPDB.