Quick Start
Cluster Deployment
Data Model
Data Writing
Data Query
SQL Reference
Maintenance and Monitoring
Tool Guide
Troubleshooting
FAQ
Recover failed primary or mirror segment instances in a cluster that has mirror segments enabled.
| Option | Description |
|---|---|
| -a | Do not prompt the user for confirmation. |
| -B parallel_processes | Number of segments to recover in parallel. If not specified, up to 16 parallel processes are started, depending on the number of segment instances requiring recovery. |
| -d master_data_directory | Data directory of the Master host. If not specified, the value of $MASTER_DATA_DIRECTORY is used. |
| -F | Perform full resynchronization when recovering failed segments. By default, incremental resynchronization is performed. |
| -i recover_config_file | Specify a file containing information about failed segments to be recovered. A sample file can be generated using the -o command. |
| -l logfile_directory | Directory where log files are written. The default is ~/gpAdminLogs. |
| -o output_recover_config_file | Specify a file path to output a sample configuration file used during recovery. The sample file contains current valid segment information and their default recovery paths, formatted according to the requirements of the -i option. Use with the -p option to generate a sample file for recovery onto different hosts. |
| -p new_recover_host[,...] | Specify one or more standby hosts outside the current MatrixDB cluster for recovering failed segments. Multiple hosts can be specified using comma separation. Each standby host must have MatrixDB installed and have hardware and OS configurations identical to those of the current cluster hosts. |
| -q | Run in quiet mode. Command output is suppressed from the screen but still written to the log file. |
| -r | After segment recovery, segment instances may not return to their initial default roles. This could leave the system in a potentially unbalanced state, as some segment hosts might end up with more primary segments than intended. This option rebalances the system by restoring primary and mirror segments to their default roles. All segments must be up and synchronized before running gprecoverseg -r. Any active queries will be canceled and rolled back. |
| -s | Display pg_basebackup progress sequentially instead of in-place. Useful when outputting to a file or a terminal that does not support escape sequences. |
| --no-progress | Suppress pg_basebackup progress display. Useful when writing output to a file. |
| --hba-hostnames | Use hostnames instead of CIDR addresses in the pg_hba.conf file. |
| -v | Enable verbose logging output. |
| --version | Show the version of this utility. |
| -? or -h or --help | Display help information. |
Recover all failed segment instances:
gprecoverseg
After recovery, rebalance the cluster and reset all segments to their default roles:
gprecoverseg -r