This section explains how to create, set, and register the standby server instance.
Note
Mirroring Controller supports instances that are registered in the Windows service.
See
Refer to "Appendix A Parameters" for details on each parameter.
Refer to "mc_ctl" in Reference for information on the command.
Perform the following procedure:
Prepare for setup.
Refer to "Preparations for Setup" in the Installation and Setup Guide for Server for information on the preparatory tasks to be performed before creating an instance on the standby server.
Note
If the primary server and standby server are to be built within the same server, perform preparation to ensure that the event source names of Symfoware Server are not duplicated with that of the primary server.
Configure the encryption settings for the storage data.
Deploy a copy of the keystore file of the primary server on the standby server.
Refer to "Database Multiplexing Mode" in the Operation Guide for details.
Execute the mc_ctl command in setup mode to create a copy of the primary server instance on the standby server. A recovery.conf file is also created using the connection information for the primary server specified in each option used with the mc_ctl command.
Example)
> mc_ctl setup -M D:\mcdir\inst1 -r standby -U userName -h primaryServerHostName -p primaryServerPortNumber --standby-name=standbyServerName
Note
If using a method that requires password authentication for connections to the primary server, you will need to ensure that authentication is performed automatically.
If the -P option is specified for the mc_ctl command in setup mode, the mc_ctl command will set the password in recovery.conf file, enabling connections to be performed automatically.
If the -P option is not specified for the mc_ctl command in setup mode, the password will not be set in recovery.conf, therefore, it will be necessary to create a password file (%APPDATA%postgresql\pgpass.conf), and then specify a password for the replication database.
Set the parameters shown in the table below in the postgresql.conf file.
Parameter | Content specified | Remarks |
---|---|---|
synchronous_standby_names | 'primaryServerName' | Required after switching the primary server and then changing the original primary server to the new standby server. Enclose the name within single quotation marks ('). Do not change this parameter while Mirroring Controller is running. |
Register an instance to the Windows service.
Refer to "Creating an Instance" in the Installation and Setup Guide for Server for information on how to register an instance to the Windows service. Note that you should execute the pg_ctl command with the following specified for the register mode to enable Mirroring Controller to start and stop an instance:
For the service name of the -N option, specify the name set for the db_instance_service_name parameter in the server definition file
Specify "demand" for the -S option, so that the service does not start automatically on startup of the system
Specify the -w option, so that the system waits for the start or stop process to complete
Note
Do not configure the Windows service of a multiplexed instance to perform automatic start, as it is started by Mirroring Controller.
If the primary server and standby server are to be built within the same server, ensure that the registered service name of the Symfoware Server instance is not duplicated with that of the primary server.
Start the Mirroring Controller process.
After ensuring that the Mirroring Controller process of the primary server has started, start the Mirroring Controller process.
As the instance administrator user, execute the mc_ctl command in start mode with the -f option specified. This action enables automatic switch or disconnection.
If you start Mirroring Controller and the instance without specifying the -f option, automatic switch and disconnection will not be enabled. To enable both, start Mirroring Controller and then execute the mc_ctl command in enable-failover mode or restart Mirroring Controller with the -f option specified.
Example)
> mc_ctl start -M D:\mcdir\inst1 -w -f
As the instance administrator user, execute the mc_ctl command in start mode.
Example)
> mc_ctl start -M D:\mcdir\inst1 -w
Check the status of the Mirroring Controller process.
As the instance administrator user, execute the mc_ctl command in status mode. Ensure that "mirroring status" is switchable.
Example)
> mc_ctl status -M D:\mcdir\inst1