The gpinitstandby utility adds a Standby Master to a MatrixDB cluster. This tool must be run only on the Master host. Before running, ensure that the MatrixDB software is installed on the Standby host and that SSH keys have been exchanged between the hosts. It is recommended to configure the same port number on both the Master and Standby hosts.
The Standby stays synchronized with the Master through transaction logs and replication processes (walsender and walreceiver). If the Master fails, the Standby can be activated as the new Master using the gpactivatestandby command.
| Option | Description |
|---|---|
-a |
Do not prompt for user confirmation. |
-D |
Set the log level to debug. |
-l *logfile_directory* |
Specify the directory to write log files to. The default is ~/gpAdminLogs. |
-n |
Use this option to start a previously configured Standby that has stopped for any reason. |
-P *port* |
Specify the port number for the Standby. The default is the port used by the Master. If the Standby and Master are on the same host, a different port must be specified. |
-q |
Run in quiet mode. Command output is not displayed on screen but is still written to the log file. |
-r |
Remove the currently configured Standby from the MatrixDB cluster. |
-s *standby_hostname* |
Specify the hostname of the Standby. |
-S *standby_data_directory* |
Specify the data directory for the new Standby. The default is the same as the Master's data directory. If the Standby and Master are on the same host, a different path must be specified using this option. |
-v |
Display the version, status, last update date, and checksum of the tool. |
-? |
Display help information. |
Add a new Standby on host09 and specify the port:
gpinitstandby -s host09 -P 2222
Start a previously configured Standby and keep it synchronized with the Master:
gpinitstandby -n
Remove the existing Standby:
gpinitstandby -r