Updated on 2024-05-07 GMT+08:00

GTM Parameters

GTM parameters can be set in the gtm.conf file or using gs_guc.

nodename

Parameter description: Specifies the name of the primary or standby GTM.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string, which complies with the identifier naming convention

Default value: NULL

port

Parameter description: Specifies the host port number listened by the primary or standby GTM.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to 2147483647. The recommended value range is 1024 to 65535.

Default value: 6666

log_file

Parameter description: Specifies a log file name.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: a string, which complies with the identifier naming convention

Default value: gtm-%Y-%m-%d_%H%M%S.log

active_host

Parameter description: Specifies the IP address of a target GTM. For the primary GTM, it is the IP address of the standby GTM; for the standby GTM, it is the IP address of the primary GTM.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: a string, which complies with the identifier naming convention

Default value: NULL

local_host

Parameter description: Specifies the HA local address. Set this parameter based on the cluster configuration file. You do not need to manually set this parameter.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: a string, which complies with the identifier naming convention.

Default value: NULL

active_port

Parameter description: Specifies the port number of the target GTM server.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to 2147483647. The recommended value range is 1024 to 65535.

This parameter is specified in the configuration file during installation. Do not modify this parameter unless absolutely necessary. Otherwise, database communication will be affected.

Default value: 0

local_port

Parameter description: Specifies the local port for HA.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to 2147483647. The recommended value range is 1024 to 65535.

This parameter is specified in the configuration file during installation. Do not modify this parameter unless absolutely necessary. Otherwise, database communication will be affected.

Default value: 0

standby_connection_timeout

Parameter description: Specifies the timeout interval between the primary and standby GTMs. A larger value enhances the fault tolerance capability of the network between the primary and standby GTMs, but increases the duration for reporting disconnection between them.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 5 to 2147483647. The unit is s.

Default value: 5

keepalives_count

Parameter description: Specifies the number of keepalived signals that can be waited before the GTM server is disconnected from the client if the OS supports the TCP_KEEPCNT socket parameter. This parameter takes effect only on the standby GTM.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to 2147483647

Default value: 0, indicating that the connection is immediately broken if no keepalived signal from the client is received by the GTM.

keepalives_idle

Parameter description: Specifies the interval for sending keepalived signals.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to 2147483647. The unit is s.

Default value: 0

keepalives_interval

Parameter description: Specifies the response time before retransmission on an OS that supports the TCP_KEEPINTVL socket option.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to 2147483647. The unit is s.

Default value: 0

synchronous_backup

Parameter description: Specifies whether to enable synchronization for backing up data to the standby GTM.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: off, on, or auto

  • on: Synchronization is enabled.
  • off: Synchronization is disabled.
  • auto: Automatic synchronization is enabled.

Default value: auto

query_memory_limit

Parameter description: Specifies the limit of memory available for queries. This parameter applies only to the default resource group. For other resource groups, the memory available for queries is not limited.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a floating point number ranging from 0.0 to 1.0

Default value: 0.25

wlm_max_mem

Parameter description: Specifies the maximum memory for GTM execution.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 512 MB to 2147483647 MB.

Default value: 2048

config_file

Parameter description: Specifies the name of a GTM configuration file. Only the sysadmin user can access this parameter.

Value range: a string Set it based on instructions provided in Table 1.

Default value: gtm.conf

data_dir

Parameter description: Specifies the GTM data file directory.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string

Default value: NULL

listen_addresses

Parameter description: Specifies the TCP/IP address of the client for a server to listen on.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range:

  • Host name or IP address. Multiple values are separated with commas (,).
  • An asterisk (*), indicating all IP addresses.
  • If the parameter is not specified, the server does not listen on any IP address. In this case, only Unix domain sockets can be used for database connections.

Default value: *

log_directory

Parameter description: Specifies the directory for storing log files when logging_collector is set to on. The value can be an absolute path, or relative to the data directory.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

  • If the value of log_directory in the configuration file is an invalid path (that is, the user does not have the permission to read or write this path), the cluster cannot be restarted.
  • If the value of log_directory is changed to a valid path (that is, the user has the permission to read and write this path), logs are generated in the new path. If the specified path is invalid, log files are generated in the last valid path and the database running is not affected. The invalid value is still written into the configuration file.

Value range: a string

Default value: gtm_log, indicating that server logs will be generated in the gtm_log/ directory under the data directory.

log_min_messages

Parameter description: Specifies which level of messages will be written into server logs. Each level covers all the levels following it. The lower the level is, the fewer messages will be written into the log.

If the values of client_min_messages and log_min_messages are the same, they indicate different levels.

Valid values: enumerated values. Valid values are debug, debug5, debug4, debug3, debug2, debug1, info, log, notice, warning, error, fatal, and panic. For details, see Table 1.

Default value: warning

alarm_component

Parameter description: Certain alarms are suppressed during alarm reporting. That is, the same alarm will not be repeatedly reported by an instance within the period specified by alarm_report_interval. Its default value is 10s. In this case, the parameter specifies the location of the alarm component that is used to process alarm information.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string

  • If --alarm-type in the gs_preinstall script is set to 5, no third-party component is connected and alarms are written into the system_alarm log. In this case, the value of alarm_component is /opt/huawei/snas/bin/snas_cm_cmd.
  • If --alarm-type in the gs_preinstall script is set to 1, a third-party component is connected. In this case, the value of alarm_component is the absolute path of the executable program of the third-party component.

Default value: /opt/huawei/snas/bin/snas_cm_cmd

alarm_report_interval

Parameter description: Specifies the interval at which an alarm is reported.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: a non-negative integer (unit: s)

Default value: 10

standby_only

Parameter description: Specifies whether to forcibly synchronize information to standby nodes. In one primary+multiple standbys mode, information is only forcibly synchronized to the ETCD.

Value range: 0 or 1. Set this parameter based on instructions provided in Table 1.

  • 0: Information is not forcibly synchronized to standby nodes.
  • 1: Information is forcibly synchronized to standby nodes.

Default value: 0

gtm_max_trans

Parameter description: Specifies the maximum number of connections accepted by the GTM. You are not advised to change the value. If you have to, set this parameter to a value no less than the maximum number of connections plus 100.

Value range: an integer ranging from 256 to 200000. Set it based on instructions provided in Table 1.

Default value: 8192

enable_connect_control

Parameter description: Specifies whether the GTM verifies that a connection IP address is within the cluster.

Value range: Boolean. Set it based on instructions provided in Table 1.

  • true: The GTM checks whether a connection IP address is within the cluster. If it is not, the access is rejected.
  • false: The GTM does not check whether a connection IP address is within the cluster.

Default value: true

gtm_authentication_type

Parameter description: Specifies the port authentication mode of the GTM. trust indicates that port authentication is not configured. gss indicates that Kerberos port authentication is used. Note that you can change the value to gss only after the Kerberos server and client are successfully installed. Otherwise, the GTM cannot communicate properly, affecting the cluster status.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: gss or trust.

Default value: trust

gtm_krb_server_keyfile

Parameter description: Specifies the location of the key file on the Kerberos server. The value must be an absolute path. The file is usually stored in the ${GAUSSHOME}/kerberos directory and ends with keytab. The file name is the same as the name of the user who runs the cluster. This parameter is used together with gtm_authentication_type. If gtm_authentication_type is changed to gss, gtm_krb_server_keyfile must be configured as the correct path. Otherwise, the cluster status will be affected.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string

Default value: "

gtm_option

Parameter description: Specifies the GTM mode, which must be set to the same value on all GTMs, CNs, and DNs. There are three GTM modes: GTM, GTM-Lite, and GTM-FREE. For details, see "GTM Mode" in Feature Guide. The GTM and GTM-Lite modes take effect only when the enable_gtm_free parameter is set to off. The current version does not support switching between different GTM modes for installed clusters.

Value range: an integer ranging from 0 to 2. The value 0 indicates the GTM mode, the value 1 indicates the GTM-Lite mode, and the value 2 indicates the GTM-FREE mode. Set it based on instructions provided in Table 1.

Default value: 1

csn_sync_interval

Parameter description: Specifies the interval for synchronizing CSN between the primary and standby GTMs.

Value range: an integer ranging from 1 to 2147483647 ‬. The unit is s. Set it based on instructions provided in Table 1.

Default value: 1

restore_duration

Parameter description: Specifies the pre-allocation interval of XID or CSN on the GTM.

Value range: an integer ranging from 1000000 to 2147483647. Set it based on instructions provided in Table 1.

Default value: 1000000

gtm_enable_threadpool

Parameter description: Specifies whether to enable the GTM thread pool function. The setting takes effect only after the GTM is restarted.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

Default value: true

gtm_num_threads

Parameter description: Specifies the number of work threads in the thread pool when the thread pool function gtm_enable_threadpool is enabled.

The value is related to the size of gtm_max_trans and cannot exceed the result of (Value of gtm_max_trans – 1 – Number of auxiliary threads). The number of auxiliary threads is 2 in the current version.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to 16384

Default value: 1024