gpexpand

1. Description

Expands an existing cluster. For usage examples, see the documentation.

2. Options

Option Description
-a or --analyze Runs ANALYZE after expansion to update table statistics. By default, ANALYZE is not run.
-B batch_size Number of remote commands to send in a batch to the target hosts before sleeping for one second. Default is 16. Valid range is 1–128.
-c or --clean Cleans up the schema used during expansion.
-d hh:mm:ss or --duration hh:mm:ss Maximum execution time for the expansion. The process stops automatically when the time is reached, even if not complete.
-e 'YYYY-MM-DD hh:mm:ss' or --end 'YYYY-MM-DD hh:mm:ss' Deadline for expansion completion. If not finished by this time, the process stops automatically.
-f filename or --hosts-file filename Specifies a file containing the hostnames of new hosts, one per line. If not specified, hostnames are entered interactively.
-i input_file or --input input_file Specifies the expansion configuration file. Each Segment to be added requires one line in the format:
hostname:address:port:datadir:dbid:content:preferred_role
-n parallel_processes Number of parallel processes for redistributing tables. Valid values are 1–96.
Each table redistribution requires two database connections: one for redistributing the table and one for recording status. Check the server configuration parameter max_connections to ensure the total does not exceed the maximum connection limit.
-r or --rollback Rolls back a failed expansion.
-s or --silent Runs in silent mode. Continues without prompting for confirmation when warnings occur.
-S or --simple-progress If specified, the gpexpand utility logs minimal progress information in gpexpand.expansion_progress.
-t directory or --tardir directory Specifies a temporary directory on Segment hosts for storing tar files.
-v or --verbose Enables detailed debug output. With this option, the tool outputs all DDL and DML used during database expansion.
--version Displays the tool version and exits.
-? or -h or --help Displays help information.

3. Examples

Add nodes using a configuration file:

gpexpand -i input_file

Run table redistribution with a maximum duration of 60 hours:

gpexpand -d 60:00:00