Top
Enterprise Postgres 17 Cluster Operation Guide(Database Multiplexing)

B.2 How to Execute the mc_ctl Command

When executing the mc_ctl command, specify the server identifier in the --local-server option in order to identify the operation destination server.

Below is an example of starting Mirroring Controller of the server "server1" defined in the network.conf file. For mc_ctl command operations using another mode, also specify the --local-server option.

Define two server identifiers for the same IP address with different port numbers in the network.conf file.

Example)
server1 192.0.2.100 27540
server2 192.0.2.100 27541

Ensure that the port numbers of both primary server and standby server do not conflict with any other software.

Enabling automatic switch/disconnection

Start Mirroring Controller of the server "server1":

Example)
$ mc_ctl start -M /mcdir/inst1 --local-server server1

Stop Mirroring Controller of the server "server1":

Example)
$ mc_ctl stop -M /mcdir/inst1 --local-server server1
Disabling automatic switch/disconnection

Start Mirroring Controller of the server "server1":

Example)
$ mc_ctl start -M /mcdir/inst1 -F --local-server server1

Stop Mirroring Controller of the server "server1":

Example)
$ mc_ctl stop -M /mcdir/inst1 --local-server server1

Note

Add the --local-server option to the mc_ctl option specification for ExecStart and ExecStop of the unit file for systemd.

Refer to "2.12 Setting Automatic Start and Stop of Mirroring Controller and Multiplexed Instances" for details.