Top
Enterprise Postgres 16 Cluster Operation Guide(Database Multiplexing)

C.1 Fencing Command

Format

The syntax for calling the fencing command from the Mirroring Controller process or the Mirroring Controller arbitration process is described below.

Fencing command of the database server
fencingCmd executionMode mcDegradationOper cmdServerId targetServerId primarycenter
Fencing command of the arbitration server
fencingCmd executionMode mcDegradationOper targetServerId

Input

Fencing command of the database server
Execution mode

monitor: Detect issues via automatic monitoring of the Mirroring Controller process

command: Mirroring Controller command execution (switch mode or detach mode of the mc_ctl command)

Degradation operation to be performed by Mirroring Controller

switch: Switch

detach: Disconnect

cmdServerId

ID of the database server that called the command

targetServerId

ID of the database server to be fenced

primarycenter

Fixed value

Fencing command of the arbitration server
Execution mode

monitor: Detect issues via automatic monitoring of the Mirroring Controller process

command: Mirroring Controller command execution (switch mode or detach mode of the mc_ctl command)

Degradation operation to be performed by Mirroring Controller

switch: Switch

detach: Disconnect

targetServerId

ID of the database server to be fenced

Output

Return value

0: Mirroring Controller will continue the degradation process.

Other than 0: Mirroring Controller will cancel the degradation process.

Description

Identifies the database server targeted for fencing based on the input server identifier, and implements the process that isolates it from the cluster system.

Notes

Information

The fencing command can be implemented by simply stopping the operating system or server. For example, if stopping the power for the database server, it is possible to use a utility to control the hardware control board in environments equipped with boards compatible with IPMI hardware standard.

Linux

Below is a sample script of a fencing command that powers off the database server using the IPMI tool.

Sample shell script
/installDir/share/mcarb_execute_fencing.sh.sample
Windows

Below is a sample script of a fencing command that powers off the database server using IPMIUTIL.

Sample shell script
installDir\share\mcarb_execute_fencing.bat.sample