The procedure for stopping database multiplexing mode and changing to single server mode is explained below.
Some tasks must be performed on the database server, and others must be performed on the arbitration server.
The tasks on the arbitration server are required only if the arbitration server is used for automatic degradation.
Tasks on the database server
Determine the server for which the instance is to be stopped, and switch this server
Determine the server that is to be excluded as the database multiplexing mode target, and for which the instance is to be stopped.
If the server for which the instance is to be stopped is the primary server, execute the mc_ctl command in the switch mode to switch the standby server to the primary server.
The standby server after the switch is complete will be the server for which the instance is to be stopped.
If the server for which the instance is to be stopped is the standby server, there is no need to perform the switch operation.
Example)
$ mc_ctl switch -M /mcdir/inst1
Stop Mirroring Controller and the instance, and delete the file resources
On the server that was determined in step 1, execute the mc_ctl command in stop mode to stop Mirroring Controller and the instance.
If automatic start and stop of Mirroring Controller has been configured using systemd, do not use the mc_ctl command, but instead use the systemctl command. Refer to "2.12 Setting Automatic Start and Stop of Mirroring Controller and Multiplexed Instances" for details.
Example)
$ mc_ctl stop -M /mcdir/inst1
Then, delete the following file resources:
Data storage destination directory
Mirroring Controller management directory
Example)
$ rm -rf /database/inst1 $ rm -rf /mcdir/inst1
See
Refer to "Security-Related Notes" in the Operation Guide for details on deleting the data securely.
Stop the application jobs
Stop the application jobs to be connected to the primary server.
Stop Mirroring Controller and the instance on the primary server
Execute the mc_ctl command in stop mode on the primary server.
If automatic start and stop of Mirroring Controller has been configured using systemd, do not use the mc_ctl command, but instead use the systemctl command. Refer to "2.12 Setting Automatic Start and Stop of Mirroring Controller and Multiplexed Instances" for details.
Example)
$ mc_ctl stop -M /mcdir/inst1
Delete the database multiplexing mode settings that were configured for the primary server instance.
Reset the postgresql.conf file parameters to their values before the database multiplexing operation was set.
Delete the file resources from the Mirroring Controller management directory.
If the backup operation was performed, delete the following resources:
Mirroring Controller management directory backup data obtained in database multiplexing mode
Instance backup data obtained in database multiplexing mode
Additionally, if the primary_conninfo parameter is set in the postgresql.auto.conf file, execute the ALTER SYSTEM RESET statement to delete the setting.
Example) An example execution of the psql command is shown below.
postgres=# ALTER SYSTEM RESET primary_conninfo;
After these actions are performed, ensure that the backup data is collected when starting the single operation.
See
Refer to "Security-Related Notes" in the Operation Guide for details on deleting the data securely.
Refer to "2.14 Backup Operation" for details on the backup operation.
Refer to "Appendix A Parameters" for details on the postgresql.conf file parameters.
Point
In the above procedure, if the postgresql.conf file of the single primary server can be changed by reloading the file, the operation mode can be changed without stopping the application job.
In that case, execute the mc_ctl command in stop mode with the --mc-only option specified to stop only Mirroring Controller in relation to stopping the primary server.
Tasks on the arbitration server
Execute the mc_arb command in stop mode to stop the Mirroring Controller arbitration process.
Example)
$ mc_arb stop -M /mcarb_dir/arbiter1
Delete the Mirroring Controller arbitration process management directory.
Example)
$ rm -rf /mcarb_dir/arbiter1
Execute the mc_arb command in stop mode to stop the Mirroring Controller arbitration process.
Example)
> mc_arb stop -M D:\mcarb_dir\arbiter1
Unregister the Mirroring Controller arbitration process from the Windows service.
Execute the mc_arb command in unregister mode to unregister the Mirroring Controller arbitration process from the Windows service.
Example)
> mc_arb unregister -M D:\mcarb_dir\arbiter1
Delete registrations related to the event log
If error logs are output to the event log in "2.2.2.1 Preparing to Output Error Logs to the Event Log (Windows)", delete the registered event source name for each instance.
Example)
> regsvr32 /u /i:"Mirroring Controller arbtier1" "c:\Program Files\Fujitsu\fsepv<x>assistant64\lib\mcarbevent.dll"
Note that "<x>" indicates the product version.
Delete the Mirroring Controller arbitration process management directory.
Example)
> rmdir /S /Q D:\mcarb_dir\arbiter1