Greenplum Segment Recovery
The gprecoverseg utility prepares the segments for recovery and then exits, allowing the Greenplum file replication processes to copy data from the primary to the mirror.
During the gprecoverseg execution the following recovery process steps are completed.
- The down segments are identified.
- The mirror segment processes are initialized.
- For full recovery (-aF):
- The data directories of the down segments are deleted.
- A new data directory structure is created.
- The segment mode in the gp_segment_configuration system table is updated to ‘r’ (resynchronization mode).
- The backend performs the following:
- Suspends IO—connections to the master are allowed, but reads and writes from the segment being recovered are not allowed.
- Scans persistent tables on the primary segment.
- For each persistent file object (relfilenode in the pg_class system table), creates a data file on the mirror.
- The gprecoverseg script completes.
Once gprecoverseg has completed, the segments are in the states shown in the following table.