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

Alarm Reporting

During the running of a database, error scenarios can be reported so that users are informed of the errors in time. You can view system_alarm logs in $GAUSSLOG/cm, $GAUSSLOG/gs_log, or $GAUSSLOG/roach/agent.

enable_alarm

Parameter description: Specifies whether to enable the alarm reporting thread to report possible fault scenarios in the database.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The alarm reporting thread is enabled.
  • off: The alarm reporting thread is disabled.

Default value: on

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: If this parameter is disabled, users cannot perceive some fault scenarios in the database.

This parameter takes effect only on DNs.

connection_alarm_rate

Parameter description: Specifies the ratio restriction on the maximum number of allowed parallel connections to the database. The maximum number of concurrent connections to the database is max_connections x connection_alarm_rate. When the number of concurrent connections exceeds max_connections x connection_alarm_rate, the backend prints the connection information log (connection_log), you can view the pg_stat_activity view and thread pool view LOCAL_THREADPOOL_STATUS in logs. (To view the pg_stat_activity view, you need to enable the tracing function. To view the thread pool view LOCAL_THREADPOOL_STATUS, you need to enable the thread pool function.)

Parameter type: floating point

Unit: none

Value range: 0 to 1

Default value: 0.9

Setting method: This is a SIGHUP 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.

alarm_report_interval

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

Parameter type: integer

Unit: second

Value range: 0 to 2147483647

Default value: 10

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. The value cannot contain a unit.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings:

  • If the value is too large and the same alarm is detected for multiple times within the specified alarm reporting interval, key alarms will be lost.
  • If the value is too small and the same alarm is detected continuously within the specified alarm reporting interval, the alarm is reported frequently.

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. Only the SYSADMIN user can access this parameter.

Parameter type: string.

Unit: none

Value range: valid file name.

  • If --alarm-type in the gs_preinstall script is set to 5, no third-party component is connected and alarms are written into system_alarm logs. 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"

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.

table_skewness_warning_threshold

Parameter description: Specifies the threshold for triggering a table skew alarm. This parameter can be set at the PDB level.

Parameter type: floating point

Unit: none

Value range: 0 to 1

Default value: 1. In the PDB scenario, if this parameter is not set, the global setting is inherited.

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

Setting suggestion: Retain the default value. You can adjust the value based on the sensitivity to table skew in service scenarios.

Risks and impacts of improper settings: If this parameter is set to a small value, the system may be more sensitive to table skew. There is no significant risk.

table_skewness_warning_rows

Parameter description: Specifies the number of rows for triggering a table skew alarm. This parameter can be set at the PDB level.

Parameter type: integer

Unit: none

Value range: 0 to 2147483647

Default value: 100000. In the PDB scenario, if this parameter is not set, the global setting is inherited.

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

Setting suggestion: Retain the default value. You can adjust the value based on the sensitivity to table skew in service scenarios.

Risks and impacts of improper settings: If this parameter is set to a small value, the system may be more sensitive to table skew. There is no significant risk.