Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page:

<style type="text/css"></style>

cubrid.conf

The cubrid.conf file that has general information on configuring CUBRID is located in the $CUBRID/conf directory. This page provides information about cubrid.conf parameters used by CUBRID HA.

ha_mode

ha_mode is a parameter used to configure whether to use CUBRID HA. The default value is off. CUBRID HA does not support Windows; it supports Linux only.

  • off: CUBIRD HA is not used.
  • on: CUBRID HA is used. Failover is supported for its node.
  • replica: CUBRID HA is used. Failover is not supported for its node.

The ha_mode parameter can be re-configured in the [@<database>] section; however, only off can be entered in the case. An error is returned if a value other than off is entered in the [@<database>] section.

If ha_mode is on, the CUBRID HA values are configured by reading cubrid_ha.conf.

This parameter cannot be modified dynamically. To modify the value of this parameter, you must restart it.

log_max_archives

log_max_archives is a parameter used to configure the maximum number of archive log files to be archived. The minimum value is 0 and the default is INT_MAX (2147483647). The behavior of the parameter is affected by force_remove_log_archives.

The existing archive log files to which the activated transaction refers or the archive log files of the master node not reflected to the slave node in HA environment will not be deleted. For details, see the following force_remove_log_archives. For details about log_max_archives, see Logging-Related Parameters.

force_remove_log_archives

It is recommended to configure force_remove_archives to no so that archive logs to be used by HA-related processes always can be maintained to set up HA environment by configuring ha_mode to on.

If you configure the value for force_remove_log_archives to yes, the archive log files which will be used in the HA-related process can be deleted, and this may lead to an inconsistency between replicated databases. If you want to maintain free disk space even though doing this could lead to risk, you can configure the value to yes. For details about force_remove_log_archives, see Logging-Related Parameters.

Note From 2008 R4.3 version, a replica node always deletes archived logs except the logs which are kept by setting the log_max_archives parameter, and this behavior is not related to the setting of force_remove_log archives parameter.

max_clients

max_clients is a parameter used to configure the maximum number of clients to be connected to a database server simultaneously. The default is 100.

Because the replication log copy and the replication log reflection processes start by default if CUBRID HA is used, you must configure the value to twice the number of all nodes in the CUBRID HA group, except the corresponding node. Furthermore, you must consider the case in which a client that is connected to another node at the time of failover attempts to connect to that node. For details about max_client, see Connection-Related Parameters.

The Parameters That Must Have the Same Value for All Nodes
  • log_buffer_size: The size of a log buffer. This must be same for all nodes, as it affects the protocol between copylogdb that duplicate the server and logs.
  • log_volume_size: The size of a log volume. In CUBRID HA, the format and contents of a transaction log are the same as that of the replica log. Therefore, the parameter must be same for all nodes. If each node creates its own DB, the cubrid createdb options (--db-volume-size, --db-page-size, --log-volume-size, --log-page-size, etc.) must be the same.
  • cubrid_port_id: The TCP port number for creating a server connection. It must be same for all nodes in order to connect copylogdb that duplicate the server and logs.
  • HA-related parameters: HA parameters included in cubrid_ha.conf must be identical by default. However, the following parameters can be set differently according to the node.
    • The ha_mode parameter in replica node
    • The ha_copy_sync_mode parameter
    • The ha_ping_hosts parameter
Example

The following example shows how to configure cubrid.conf. Please take caution when configuring log_max_archives and force_remove_log_archives (logging-related parameters), and ha_mode (an HA-related parameter).

max_clients=200

 # Service Parameters

[service]

service=server,broker,manager

 

 

# Server Parameters

server=testdb

data_buffer_size=512M

log_buffer_size=4M

sort_buffer_size=2M

max_clients=200

cubrid_port_id=1523

db_volume_size=512M

log_volume_size=512M

 

# Adds when configuring HA (Logging parameters)

log_max_archives=100

force_remove_log_archives=no

 

# Adds when configuring HA (HA mode)

ha_mode=on

log_max_archives=100