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. This parameter can be set at the PDB level.

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. In the PDB scenario, if this parameter is not set, the global settings will apply.

Setting method: This is a USERSET parameter. Set it based on instructions provided in 16.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 16.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 (?). This parameter can be set at the PDB level.

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. In the PDB scenario, if this parameter is not set, the global settings will apply.

Setting method: This is a USERSET parameter. Set it based on instructions provided in 16.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.

cn_send_buffer_size

Parameter description: Specifies the size of the data buffer used for data transmission on the primary database node.

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 16.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.

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 16.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.

Value 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.