Updated on 2025-05-29 GMT+08:00

Fault Tolerance

This section describes parameters used for controlling how the server processes an error occurring in the database system.

exit_on_error

Parameter description: If this function is enabled, errors of the ERROR level will be escalated to PANIC errors, and core stacks will be generated. It is mainly used to locate problems and test services.

Parameter type: Boolean.

Unit: none

Value range:

  • on: Errors of the ERROR level will be escalated to PANIC errors.
  • off: Errors of the ERROR level will not be escalated.

Default value: off

Setting method: This is a USERSET parameter. Set it based on instructions provided in 17.2-Table 1 GUC parameters.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

restart_after_crash

Parameter description: If this parameter is enabled and a backend thread crashes, GaussDB automatically reinitializes the backend thread.

Parameter type: Boolean.

Unit: none

Value range:

  • on: GaussDB can automatically reinitialize a backend thread when the backend thread breaks down. In some circumstances (for example, when a management tool, such as xCAT, is used to manage GaussDB), setting this parameter to on maximizes the availability of the database.
  • off: A management tool is enabled to obtain control permission and take proper measures when a backend thread crashes.

Default value: on

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in 17.2-Table 1 GUC parameters.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

omit_encoding_error

Parameter description: If this parameter is enabled and the client character set of the database is encoded in UTF-8 format, character encoding conversion errors will be recorded in logs. Additionally, converted characters that have conversion errors will be ignored and replaced with question marks (?).

Parameter type: Boolean.

Unit: none

Value range:

  • on: Characters that have conversion errors will be ignored and replaced with question marks (?), and error information will be recorded in logs.
  • off: Characters that have conversion errors cannot be converted and error information will be directly displayed.

Default value: off

Setting method: This is a USERSET parameter. Set it based on instructions provided in 17.2-Table 1 GUC parameters.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

If this parameter is modified by running the gs_guc reload command and the connection of a session on the current node is not from the client but from another node in the cluster to which the node belongs, this parameter does not take effect immediately on the session after the gs_guc reload command is executed. The setting takes effect only after the connection node is disconnected and then reconnected.

cn_send_buffer_size

Parameter description: Specifies the size of the data buffer used for data transmission on CNs.

Parameter type: integer.

Unit: KB

Value range: 8–128

Default value: 8

Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in 17.2-Table 1 GUC parameters. For example, if this parameter is set to 100 without a unit, it indicates 100 KB. If this parameter is set to 128kB, it indicates 128 KB. The unit must be KB if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

max_cn_temp_file_size

Parameter description: Specifies the maximum size of temporary files used by the the primary node of the database when the SQL statement automatic retry function is enabled. The value 0 indicates that temporary files are not used.

Parameter type: integer.

Unit: KB

Value range: 0 to 10485760

Default value: 5242880 (that is, 5 GB)

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in 17.2-Table 1 GUC parameters. For example, if this parameter is set to 100 without a unit, it indicates 100 KB. If this parameter is set to 16MB, it indicates 16 MB. The unit must be KB, MB, or GB if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

data_sync_retry

Parameter description: Specifies whether to keep running the database when updated data fails to be written into disks by using the fsync function. In some OSs, no error is reported even if fsync fails after the second attempt. As a result, data is lost.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The retry mechanism is used to continue running the database after fsync fails to synchronize data to the disk.
  • off: A PANIC-level error is reported and the database is stopped after fsync fails.

Default value: off

Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in 17.2-Table 1 GUC parameters.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

remote_read_mode

Parameter description: Specifies whether to enable the remote read function. This function allows pages on the standby node to be read when reading pages on the primary node fails.

Parameter type: enumerated type.

Unit: none

Value range: off, non_authentication, and authentication

  • off: The remote read function is disabled.
  • non_authentication: The remote read function is enabled but certificate authentication is not required.
  • authentication: The remote read function is enabled and certificate authentication is required.

Default value: authentication

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.