Top
Enterprise Postgres 17 Cluster Operation Guide(Database Multiplexing)

2.6 Creating a User Exit for a Database Server

This section explains how to create a user exit for a database server.

The user command types explained below can be used as user exits. These commands are called by Mirroring Controller management processes.

The user can create user exits as required.

Specify the user commands that were created for the parameters in the server configuration file of the database server. Refer to "A.4.1 Server Configuration File for the Database Servers" for information on these parameters.

User command types

Point

When the arbitration server is used for automatic degradation and the requirements can be satisfied using the fencing command on the arbitration server only, the fencing command on the database server is not required. In addition, if the requirements can be satisfied using the fencing command on the database server only, create a fencing command on the arbitration server for termination processing only (without implementation).


Table 2.6 Availability of user commands, and database server calling the command

User command

Operation when a heartbeat abnormality is detected using operating system or server heartbeat monitoring

Database server calling the command

Message output

Automatic degradation by arbitration server

Automatic degradation by arbitration command

Unconditional automatic degradation

Primary server

Standby server

Fencing command

Y (*1)

Y (*2)

R

N

Y

Y

Arbitration command

N

N

R

N

Y

Y

Post-switch command

Y

Y

Y

Y

Y

N

Pre-detach command

Y

Y

Y

Y

Y

Y (*3)

Post-attach command

Y

Y

Y

Y

Y

Y (*3)

R: Required

Y: Can be used

N: Cannot be used

*1: Called only when the mc_ctl command is used to execute forced switching or forced disconnection.

*2: Creation of a fencing command on a database server is optional, but it must be created on the arbitration server.

*3: If message output or unconditional automatic degradation is selected, this command is called only from the primary server.

See

Refer to "Appendix C User Commands" for information on the interface for each user command.