gpexpand

1. Description

To expand the existing cluster, please refer to [Document] (/doc/4.8/maintain/expand) for application cases.

2. Parameter options

Parameter name Description
-a or --analyze Study ANALYZE after expansion and update the statistics of the table. ANALYZE is not run by default.
-B batch_size The number of remote commands sent to the specified host in batches before sleeping for one second each time. The default value is 16, and the range is 1-128.
-c or --clean Clean
-d hh:mm:ss or --duration hh:mm:ss Maximum execution time for expansion, it will automatically stop even if it is not completed.
-e 'YYYY-MM-DD hh:mm:ss' or --end 'YYYY-MM-DD hh:mm:ss' The end time of the capacity expansion ends, and will automatically stop if the time has not yet ended.
-f filename or --hosts-file filename Specifies the file used for expansion that contains the new hostname, one hostname per line. If not specified, fill in during the interaction process.
-i input_file or --input input_file Specify the configuration file for expansion. Each Segment needs to add a line, the format is:
hostname:address:port:datadir:dbid:content:preferred_role
-n parallel_processes Redistribute the number of parallel tables. Valid values ​​are 1 - 96.
Each table redistribution process requires two database connections: one for redistribution tables and the other for recording state. Before use, you need to check the value of the server configuration parameter max_connections to ensure that the maximum connection limit is not exceeded.
-r or --rollback Rolling failed expansion.
-s or --silent runs in silent mode. When warning, you can continue without prompting to confirm.
-S or --simple-progress If specified, the gpexpand tool will record the minimum progress information in gpexpand.expansion_progress.
-t directory or --tardir directory Specify a temporary directory on the Segment host to store tar files.
-v or --verbose Detailed debug output. With this option, the tool will output all DDL and DML used to extend the database.
--version Show the version number of the tool and exit.
-? or -h or --help Show help information.

3. Example

Add nodes using configuration files:

gpexpand -i input_file

The run table is redistributed and the upper limit of run time is 60 hours:

gpexpand -d 60:00:00