mxinitstandby

This document introduces the master node (Master) standby node instance addition tool mxinitstandby.

1 Description

Add or initialize Standby for the YMatrix database system.

2 Command line parameter information

The following is a detailed command line parameter information:

| Subcommand | Parameter name | Description | Optional | | --- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | init | | Convert the collected information into a basic plan | | | | --db-cluster-id | Database cluster ID. To identify a unique database cluster | Optional | | | --host | Add Standby's host | Required | | | --port | Start searching for an idle port as the port for Standby listening, and by default, start searching from 5432 | Optional | | plan | | Generate deployment plan | | | | --init-file | init command output information redirects the absolute path of the redirect file | Required | | setup | | Execution deployment | | | | --plan-file | plan command outputs the absolute path to the redirect file | Required |

3 Usage process example

mxinitstandby needs to be executed on users with sudo permissions (except mxadmin) (except mxadmin, the absolute path /opt/ymatrix/matrixdb5/bin/mxinitstandby). If the mxinitstandby init command is executed on a user without sudo permission, the mxinitstandby.init file will be generated under that user, and other users can only read and not write. The generated file needs to be deleted, and then re-execute the command on the user with sudo permissions to re-generate the file.
Here we give an example of the process. The details are as follows:

Notes!
You need to perform the following complete Standby addition process.

  1. Collect machine information and some information about the deployed database.

    $ mxinitstandby init --host <standby_hostname> > /tmp/mxinitstandby.init

    Notes!
    Please replace <host> with the corresponding host name.

  2. Generate a deployment plan based on the collected information, that is, the specific deployment steps.

    $ mxinitstandby plan --init-file /tmp/mxinitstandby.init > /tmp/mxinitstandby.plan
  3. Perform deployment.

    $ mxinitstandby setup --plan-file /tmp/mxinitstandby.plan --mode cli

    Notes!
    YMatrix 5 deploys a brand new database schema, enables the mxinitstandby tool to add Standby, which is incompatible with gpinitstandby. Previous versions were available using the gpinitstandby tool.

See also: mxaddmirrors, mxdeletesysystem.