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

DB Instance Parameters

This section describes the GaussDB instance parameters that can be modified.

Configurable Parameters for Version 3.X

The following table describes parameters that can be modified.

Table 1 Parameters for distributed instances

Parameter

Description

audit_system_object

Determines whether to audit the CREATE, DROP, and ALTER operations on GaussDB Kernel database objects. GaussDB Kernel database objects include databases, users, schemas, and tables. You can change the parameter value to audit only the operations on required database objects. During a forcible primary/standby failover, set audit_system_object to the maximum value and audit all DDL objects. If the parameter value is incorrectly changed, DDL audit logs will be lost. Contact technical support to change it.

autoanalyze

Specifies whether to automatically collect statistics on tables without statistics when a plan is generated.

autoanalyze_timeout

Specifies the autoanalyze timeout period, in seconds. If the duration of autoanalyze on a table exceeds the value of autoanalyze_timeout, the autoanalyze operation is automatically canceled. 0 indicates there is no timeout. The unit is second.

cn:effective_cache_size

Specifies the size of the disk buffer available to the CN optimizer in a single query. The unit is 8 KB.

cn:enable_hotkeys_collection

Specifies whether to collect statistics on accessed key values in databases.

cn:track_stmt_session_slot

Specifies the maximum number of full or slow SQL statements that can be cached in a CN session.

datestyle

Specifies the display format for date and time.

dn:effective_cache_size

Specifies the size of the disk buffer available to the DN optimizer in a single query. The unit is 8 KB.

dn:enable_hotkeys_collection

Specifies whether to collect statistics on accessed key values in databases.

dn:track_stmt_session_slot

Specifies the maximum number of full or slow SQL statements that can be cached in a DN session.

enable_seqscan

Specifies whether to enable the optimizer's use of sequential scan plan types. It is impossible to completely suppress sequential scans, but setting this parameter to off allows the optimizer to choose other methods if available.

enable_slot_log

Specifies whether to enable primary/standby synchronization for logical replication slots.

enable_stream_operator

Specifies the query optimizer's use of streams. When this parameter is set to off, a large number of logs indicating that the stream plans cannot be pushed down are recorded.

failed_login_attempts

Specifies the maximum number of incorrect password attempts before an account is locked. The account will be automatically unlocked after the time specified in password_lock_time elapses. Only the sysadmin user can set this parameter.

log_min_duration_statement

Causes the duration of each completed statement to be logged if the statement ran for at least the specified number of milliseconds. The value -1 disables logging statement durations. If this parameter is set to a small value, the load throughput may be affected.

max_replication_slots

Specifies the number of log replication slots in the primary node.

max_wal_senders

The following processes occupy walsender threads: standby DNs connect to primary DNs to obtain physical logs, and logical replication tools connect to primary DNs to obtain logical logs. This parameter specifies the maximum number of walsender threads that can be created.

password_effect_time

Specifies the validity period of the password, in days.

password_lock_time

Determines how many days an account is locked.

recovery_time_target

Specifies the time for the standby node to write and replay logs, in seconds.

session_timeout

Specifies how long to wait before a server connection is disconnected due to inactivity, in seconds. The value 0 indicates there is no time limit.

timezone

Specifies the time zone for displaying and interpreting time stamps.

track_stmt_stat_level

Controls the level of statement execution tracking.

update_lockwait_timeout

Specifies the maximum duration, in milliseconds, that a lock waits for concurrent updates on a row to complete when the concurrent update feature is enabled. If the lock wait time exceeds this value, the system will report an error.

wal_level

Specifies the level of information to be written to the WAL. This is a required value and cannot be commented out. Determines how much information is written to the WAL. When this parameter is set to logical, logical logs are extracted and primary key information is recorded in Xlogs.

cn:audit_thread_num

Specifies the number of audit threads. Value range: 1 to 48.

dn:audit_thread_num

Specifies the number of audit threads. Value range: 1 to 48.

cn:qrw_inlist2join_optmode

Determines whether to enable inlist-to-join query rewrite.

dn:qrw_inlist2join_optmode

Determines whether to enable inlist-to-join query rewrite.

cn:audit_xid_info

Determines whether to record the transaction IDs of SQL statements in detail_info. 0: The transaction IDs are not recorded. 1: The transaction IDs are recorded.

dn:audit_xid_info

Determines whether to record the transaction IDs of SQL statements in detail_info. 0: The transaction IDs are not recorded. 1: The transaction IDs are recorded.

cn:default_limit_rows

Limits the estimated number of rows for generating a generic plan. If this parameter is set to a negative value, the negative value is converted to a percentage, for example, -5 is equivalent to 5%, indicating the 5% rows of the total rows are returned.

dn:default_limit_rows

Limits the estimated number of rows for generating a generic plan. If this parameter is set to a negative value, the negative value is converted to a percentage, for example, -5 is equivalent to 5%, indicating the 5% rows of the total rows are returned.

cn:audit_dml_state_select

Determines whether to audit the SELECT operation.

dn:audit_dml_state_select

Determines whether to audit the SELECT operation.

cn:audit_dml_state

Determines whether to enable the audit of INSERT, UPDATE, and DELETE operations on a specific table. 0: These operations are not audited. 1: These operations are audited.

dn:audit_dml_state

Determines whether to enable the audit of INSERT, UPDATE, and DELETE operations on a specific table. 0: These operations are not audited. 1: These operations are audited.

cn:random_page_cost

Specifies the estimated cost for the optimizer to fetch an out-of-sequence disk page.

dn:random_page_cost

Specifies the estimated cost for the optimizer to fetch an out-of-sequence disk page.

cn:enable_security_policy

Controls whether unified audit and dynamic data masking policies are applied.

dn:enable_security_policy

Controls whether unified audit and dynamic data masking policies are applied.

cn:audit_set_parameter

Determines whether to audit the SET operation. 0: The SET operation is not audited. 1: The SET operation is audited.

dn:audit_set_parameter

Determines whether to audit the SET operation. 0: The SET operation is not audited. 1: The SET operation is audited.

cn:enable_pbe_optimization

Controls whether the optimizer optimizes the query plan for statements executed in Parse Bind Execute (PBE) mode.

dn:enable_pbe_optimization

Controls whether the optimizer optimizes the query plan for statements executed in Parse Bind Execute (PBE) mode.

wdr_snapshot_interval

Specifies the interval (in minutes) at which the backend thread Snapshot automatically performs snapshot operations on the database monitoring data.

cn:enable_auto_explain

Specifies whether to automatically print execution plans. This parameter is used to locate slow stored procedures or slow queries.

dn:enable_auto_explain

Specifies whether to automatically print execution plans. This parameter is used to locate slow stored procedures or slow queries.

enable_wdr_snapshot

Specifies whether to enable WDR snapshots.

cn:max_concurrent_autonomous_transactions

Specifies the maximum number of autonomous transaction connections, that is, the maximum number of concurrent autonomous transactions executed at the same time. If this parameter is set to 0, autonomous transactions cannot be executed.

dn:max_concurrent_autonomous_transactions

Specifies the maximum number of autonomous transaction connections, that is, the maximum number of concurrent autonomous transactions executed at the same time. If this parameter is set to 0, autonomous transactions cannot be executed.

cn:max_standby_archive_delay

Specifies how long a standby server waits when the queries that conflict with WAL processing and archiving in hot standby mode. The unit is ms.

dn:max_standby_archive_delay

Specifies how long a standby server waits when the queries that conflict with WAL processing and archiving in hot standby mode. The unit is ms.

cn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

dn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

cn:recovery_max_workers

Specifies the number of concurrent replay threads.

dn:recovery_max_workers

Specifies the number of concurrent replay threads.

cn:auto_explain_log_min_duration

Specifies how long execution plans are automatically printed for. Plans can be printed only when the time required to execute the plans is greater than the value of auto_explain_log_min_duration. Unit: ms

dn:auto_explain_log_min_duration

Specifies how long execution plans are automatically printed for. Plans can be printed only when the time required to execute the plans is greater than the value of auto_explain_log_min_duration. Unit: ms.

cn:audit_function_exec

Specifies whether to record the audit information during the execution of the stored procedures, anonymous blocks, or user-defined functions (excluding system functions).

dn:audit_function_exec

Specifies whether to record the audit information during the execution of the stored procedures, anonymous blocks, or user-defined functions (excluding system functions).

cn:local_syscache_threshold

Specifies the size of system catalog cache in a session. Unit: KB

dn:local_syscache_threshold

Specifies the size of system catalog cache in a session. Unit: KB

cms:datastorage_threshold_value_check

Specifies the disk usage threshold to put a database node into read-only mode. If the disk usage of a data directory exceeds this threshold, the database node is automatically changed to read-only.

wdr_snapshot_retention_days

Specifies how many days database monitoring snapshots are saved for.

cn:enable_default_ustore_table

Determines whether to enable the Ustore storage engine by default. The value on indicates all created tables are Ustore tables.

dn:enable_default_ustore_table

Determines whether to enable the Ustore storage engine by default. The value on indicates all created tables are Ustore tables.

cn:undo_space_limit_size

Specifies the undo forcible reclamation threshold. If 80% of the specified parameter value is reached, forcible reclamation is triggered. The unit is 8 KB. It is recommended that the value be at least the value of undo_limit_size_per_transaction.

dn:undo_space_limit_size

Specifies the undo forcible reclamation threshold. If 80% of the specified parameter value is reached, forcible reclamation is triggered. The unit is 8 KB. It is recommended that the value be at least the value of undo_limit_size_per_transaction.

cn:undo_limit_size_per_transaction

Specifies the maximum undo space for a single transaction. The unit is 8 KB. If the undo space of a transaction exceeds this parameter value, the transaction is rolled back due to an error. It is recommended that this parameter value be smaller than the value of undo_space_limit_size. If this parameter value is larger, the value of undo_space_limit_size will be used as the maximum undo space.

dn:undo_limit_size_per_transaction

Specifies the maximum undo space for a single transaction. The unit is 8 KB. If the undo space of a transaction exceeds this parameter value, the transaction is rolled back due to an error. It is recommended that this parameter value be smaller than the value of undo_space_limit_size. If this parameter value is larger, the value of undo_space_limit_size will be used as the maximum undo space.

cn:enable_recyclebin

Enables or disables the recycle bin in real time.

dn:enable_recyclebin

Enables or disables the recycle bin in real time.

cn:recyclebin_retention_time

Specifies how long files will be kept in the recycle bin, in seconds. Files in the recycle bin will be automatically deleted after this length of time.

dn:recyclebin_retention_time

Specifies how long files will be kept in the recycle bin, in seconds. Files in the recycle bin will be automatically deleted after this length of time.

cn:undo_retention_time

Specifies how long undo logs are kept, in seconds. This parameter is only used for flashback query. Note: 1. The undo space of the local disk increases. 2. In subsequent incremental backups, the size of the backup set increases, because extra undo content is retained.

dn:undo_retention_time

Specifies how long undo logs are kept, in seconds. This parameter is only used for flashback query. Note: 1. The undo space of the local disk increases. 2. In subsequent incremental backups, the size of the backup set increases, because extra undo content is retained.

cn:cost_model_version

Specifies the version of the optimizer cost model. It is a protective parameter. It prevents new optimizer cost models from being applied, so you can keep the current model consistent with the plan of an existing version. If the value of this parameter is changed, many SQL plans may be changed. Exercise caution when modifying this parameter.

dn:cost_model_version

Specifies the version of the optimizer cost model. It is a protective parameter. It prevents new optimizer cost models from being applied, so you can keep the current model consistent with the plan of an existing version. If the value of this parameter is changed, many SQL plans may be changed. Exercise caution when modifying this parameter.

cn:enable_dynamic_samplesize

Specifies whether to dynamically adjust the number of sampled rows. For a large table with more than one million rows, the number of sampled rows is dynamically adjusted during statistics collection to improve statistics accuracy.

dn:enable_dynamic_samplesize

Specifies whether to dynamically adjust the number of sampled rows. For a large table with more than one million rows, the number of sampled rows is dynamically adjusted during statistics collection to improve statistics accuracy.

cn:resilience_ctrlslot_available_maxpercent

Specifies the maximum percentage of threads in the thread pool occupied by slow SQL statements. This parameter is only suitable for SELECT statements executed by non-sysadmin/monitoradmin users.

dn:resilience_ctrlslot_available_maxpercent

Specifies the maximum percentage of threads in the thread pool occupied by slow SQL statements. This parameter is only suitable for SELECT statements executed by non-sysadmin/monitoradmin users.

cn:resilience_ctrlstmt_control_iopslimit

Specifies the maximum IOPS that can be used by slow SQL statements after normal SQL statements are marked as slow SQL statements. This parameter is only suitable for SELECT statements executed by non-sysadmin/monitoradmin users. 0(None): The IOPS is not limited. 10(LOW): The limit level for IOPS is LOW. 20(MEDIUM): The limit level for IOPS is MEDIUM. 50(HIGH): The limit level for IOPS is HIGH.

dn:resilience_ctrlstmt_control_iopslimit

Specifies the maximum IOPS that can be used by slow SQL statements after normal SQL statements are marked as slow SQL statements. This parameter is only suitable for SELECT statements executed by non-sysadmin/monitoradmin users. 0(None): The IOPS is not limited. 10(LOW): The limit level for IOPS is LOW. 20(MEDIUM): The limit level for IOPS is MEDIUM. 50(HIGH): The limit level for IOPS is HIGH.

dn:resilience_ctrlstmt_detect_timelimit

Specifies the execution time of a normal SQL statement that will be marked as a slow SQL statement. The value 0 indicates that slow SQL statements are not identified. A value greater than 0 indicates that a normal SQL statement whose execution time exceeds the value of this parameter is marked as a slow SQL statement. This parameter is only suitable for SELECT statements executed by non-sysadmin/monitoradmin users. Unit: ms

Table 2 Parameters for primary/standby instances

Parameter

Description

audit_system_object

Determines whether to audit the CREATE, DROP, and ALTER operations on GaussDB Kernel database objects. GaussDB Kernel database objects include databases, users, schemas, and tables. You can change the parameter value to audit only the operations on required database objects. During a forcible primary/standby failover, set audit_system_object to the maximum value and audit all DDL objects. If the parameter value is incorrectly changed, DDL audit logs will be lost. Contact technical support to change it.

autoanalyze

Specifies whether to automatically collect statistics on tables without statistics when a plan is generated.

autoanalyze_timeout

Specifies the autoanalyze timeout period, in seconds. If the duration of autoanalyze on a table exceeds the value of autoanalyze_timeout, the autoanalyze operation is automatically canceled. 0 indicates there is no timeout. The unit is second.

datestyle

Specifies the display format for date and time.

dn:wal_keep_segments

Specifies the minimum number of transaction log files stored in the pg_xlog directory. Standby nodes obtain the logs from the primary node to perform streaming replication.

enable_seqscan

Specifies whether to enable the optimizer's use of sequential scan plan types. It is impossible to completely suppress sequential scans, but setting this parameter to off allows the optimizer to choose other methods if available.

enable_slot_log

Specifies whether to enable primary/standby synchronization for logical replication slots.

failed_login_attempts

Specifies the maximum number of incorrect password attempts before an account is locked. The account will be automatically unlocked after the time specified in password_lock_time elapses. Only the sysadmin user can set this parameter.

log_min_duration_statement

Causes the duration of each completed statement to be logged if the statement ran for at least the specified number of milliseconds. The value -1 disables logging statement durations. If this parameter is set to a small value, the load throughput may be affected.

max_replication_slots

Specifies the number of log replication slots in the primary node.

max_wal_senders

The following processes occupy walsender threads: standby DNs connect to primary DNs to obtain physical logs, and logical replication tools connect to primary DNs to obtain logical logs. This parameter specifies the maximum number of walsender threads that can be created.

password_effect_time

Specifies the validity period of the password, in days.

password_lock_time

Determines how many days an account is locked.

session_timeout

Specifies how long to wait before a server connection is disconnected due to inactivity, in seconds. The value 0 indicates there is no time limit.

timezone

Specifies the time zone for displaying and interpreting time stamps.

update_lockwait_timeout

Specifies the maximum duration, in milliseconds, that a lock waits for concurrent updates on a row to complete when the concurrent update feature is enabled. If the lock wait time exceeds this value, the system will report an error.

wal_level

Specifies the level of information to be written to the WAL. This is a required value and cannot be commented out. Determines how much information is written to the WAL. When this parameter is set to logical, logical logs are extracted and primary key information is recorded in Xlogs.

dn:audit_thread_num

Specifies the number of audit threads. Value range: 1 to 48.

dn:qrw_inlist2join_optmode

Determines whether to enable inlist-to-join query rewrite.

dn:audit_xid_info

Determines whether to record the transaction IDs of SQL statements in detail_info. 0: The transaction IDs are not recorded. 1: The transaction IDs are recorded.

dn:default_limit_rows

Limits the estimated number of rows for generating a generic plan. If this parameter is set to a negative value, the negative value is converted to a percentage, for example, -5 is equivalent to 5%, indicating the 5% rows of the total rows are returned.

dn:audit_dml_state_select

Determines whether to audit the SELECT operation.

dn:audit_dml_state

Determines whether to enable the audit of INSERT, UPDATE, and DELETE operations on a specific table. 0: These operations are not audited. 1: These operations are audited.

dn:random_page_cost

Specifies the estimated cost for the optimizer to fetch an out-of-sequence disk page.

dn:enable_security_policy

Controls whether unified audit and dynamic data masking policies are applied.

dn:audit_set_parameter

Determines whether to audit the SET operation. 0: The SET operation is not audited. 1: The SET operation is audited.

dn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

dn:vacuum_defer_cleanup_age

Specifies the number of transactions used by VACUUM.

dn:enable_pbe_optimization

Controls whether the optimizer optimizes the query plan for statements executed in Parse Bind Execute (PBE) mode.

wdr_snapshot_interval

Specifies the interval (in minutes) at which the backend thread Snapshot automatically performs snapshot operations on the database monitoring data.

undo_retention_time

Specifies how long undo logs are kept, in seconds. This parameter is only used for flashback query. Note: 1. The undo space of the local disk increases. 2. In subsequent incremental backups, the size of the backup set increases, because extra undo content is retained.

track_stmt_stat_level

Controls the level of statement execution tracking.

dn:enable_auto_explain

Specifies whether to automatically print execution plans. This parameter is used to locate slow stored procedures or slow queries.

enable_wdr_snapshot

Specifies whether to enable WDR snapshots.

dn:max_concurrent_autonomous_transactions

Specifies the maximum number of autonomous transaction connections, that is, the maximum number of concurrent autonomous transactions executed at the same time. If this parameter is set to 0, autonomous transactions cannot be executed.

dn:max_standby_archive_delay

Specifies how long a standby server waits when the queries that conflict with WAL processing and archiving in hot standby mode. The unit is ms.

dn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

dn:recovery_max_workers

Specifies the number of concurrent replay threads.

dn:auto_explain_log_min_duration

Specifies how long execution plans are automatically printed for. Plans can be printed only when the time required to execute the plans is greater than the value of auto_explain_log_min_duration. Unit: ms

dn:recovery_time_target

Specifies the time for the standby node to write and replay logs. The unit is second.

dn:audit_function_exec

Specifies whether to record the audit information during the execution of the stored procedures, anonymous blocks, or user-defined functions (excluding system functions).

dn:local_syscache_threshold

Specifies the size of system catalog cache in a session. Unit: KB

cms:datastorage_threshold_value_check

Specifies the disk usage threshold to put a database node into read-only mode. If the disk usage of a data directory exceeds this threshold, the database node is automatically changed to read-only.

wdr_snapshot_retention_days

Specifies how many days database monitoring snapshots are saved for.

dn:undo_space_limit_size

Specifies the undo forcible reclamation threshold. If 80% of the specified parameter value is reached, forcible reclamation is triggered. The unit is 8 KB. It is recommended that the value be at least the value of undo_limit_size_per_transaction.

dn:group_concat_max_len

Specifies the maximum permitted result length in bytes for the GROUP_CONCAT() function.

dn:enable_extension

Controls whether database extension plug-ins can be created. The extension plug-in is a lab feature and is not recommended.

dn:cost_model_version

Specifies the version of the optimizer cost model. It is a protective parameter. It prevents new optimizer cost models from being applied, so you can keep the current model consistent with the plan of an existing version. If the value of this parameter is changed, many SQL plans may be changed. Exercise caution when modifying this parameter.

dn:immediate_analyze_threshold

Specifies the threshold for triggering ANALYZE. When the amount of inserted data is (Original data amount x This parameter value) and the total number of rows exceeds 100, ANALYZE is triggered.

dn:enable_dynamic_samplesize

Specifies whether to dynamically adjust the number of sampled rows. For a large table with more than one million rows, the number of sampled rows is dynamically adjusted during statistics collection to improve statistics accuracy.

dn:max_io_capacity

Specifies the maximum I/O per second for the backend write process to flush pages in batches, in KB. Set this parameter based on the service scenario and the disk I/O capability. If the RTO is short or the data volume is many times that of the shared memory and the service access data volume is random, the value of this parameter cannot be too small. A small value of max_io_capacity reduces the number of pages flushed by the backend write process. If a large number of pages are eliminated due to service triggering, the services are affected.

dn:max_connections

Specifies the maximum number of concurrent connections to DNs.

log_autovacuum_min_duration

Specifies the interval which should elapse before autovacuum operations are logged. Autovacuum operations equal to or beyond the specified interval will be logged. If it is set to 0, all autovacuum operations will be logged. If it is set to -1, no autovacuum operations will be logged.

Configurable Parameters for Version 2.X

The following table describes parameters that can be modified.

Table 3 Parameters for distributed instances

Parameter

Description

audit_system_object

Determines whether to audit the CREATE, DROP, and ALTER operations on GaussDB Kernel database objects. GaussDB Kernel database objects include databases, users, schemas, and tables. You can change the parameter value to audit only the operations on required database objects. During a forcible primary/standby failover, set audit_system_object to the maximum value and audit all DDL objects. If the parameter value is incorrectly changed, DDL audit logs will be lost. Contact technical support to change it.

autoanalyze

Specifies whether to automatically collect statistics on tables without statistics when a plan is generated.

autoanalyze_timeout

Specifies the autoanalyze timeout period, in seconds. If the duration of autoanalyze on a table exceeds the value of autoanalyze_timeout, the autoanalyze operation is automatically canceled. 0 indicates there is no timeout. The unit is second.

cn:effective_cache_size

Specifies the size of the disk buffer available to the CN optimizer in a single query. The unit is 8 KB.

cn:enable_hotkeys_collection

Specifies whether to collect statistics on accessed key values in databases.

cn:track_stmt_session_slot

Specifies the maximum number of full or slow SQL statements that can be cached in a CN session.

datestyle

Specifies the display format for date and time.

dn:effective_cache_size

Specifies the size of the disk buffer available to the DN optimizer in a single query. The unit is 8 KB.

dn:enable_hotkeys_collection

Specifies whether to collect statistics on accessed key values in databases.

dn:track_stmt_session_slot

Specifies the maximum number of full or slow SQL statements that can be cached in a DN session.

enable_seqscan

Specifies whether to enable the optimizer's use of sequential scan plan types. It is impossible to completely suppress sequential scans, but setting this parameter to off allows the optimizer to choose other methods if available.

enable_slot_log

Specifies whether to enable primary/standby synchronization for logical replication slots.

enable_stream_operator

Specifies the query optimizer's use of streams. When this parameter is set to off, a large number of logs indicating that the stream plans cannot be pushed down are recorded.

failed_login_attempts

Specifies the maximum number of incorrect password attempts before an account is locked. The account will be automatically unlocked after the time specified in password_lock_time elapses. Only the sysadmin user can set this parameter.

log_min_duration_statement

Causes the duration of each completed statement to be logged if the statement ran for at least the specified number of milliseconds. The value -1 disables logging statement durations. If this parameter is set to a small value, the load throughput may be affected.

max_replication_slots

Specifies the number of log replication slots in the primary node.

max_wal_senders

The following processes occupy walsender threads: standby DNs connect to primary DNs to obtain physical logs, and logical replication tools connect to primary DNs to obtain logical logs. This parameter specifies the maximum number of walsender threads that can be created.

password_effect_time

Specifies the validity period of the password, in days.

password_lock_time

Determines how many days an account is locked.

recovery_time_target

Specifies the time for the standby node to write and replay logs, in seconds.

session_timeout

Specifies how long to wait before a server connection is disconnected due to inactivity, in seconds. The value 0 indicates there is no time limit.

timezone

Specifies the time zone for displaying and interpreting time stamps.

track_stmt_stat_level

Controls the level of statement execution tracking.

update_lockwait_timeout

Specifies the maximum duration, in milliseconds, that a lock waits for concurrent updates on a row to complete when the concurrent update feature is enabled. If the lock wait time exceeds this value, the system will report an error.

wal_level

Specifies the level of information to be written to the WAL. This is a required value and cannot be commented out. Determines how much information is written to the WAL. When this parameter is set to logical, logical logs are extracted and primary key information is recorded in Xlogs.

cn:audit_thread_num

Specifies the number of audit threads. Value range: 1 to 48.

dn:audit_thread_num

Specifies the number of audit threads. Value range: 1 to 48.

cn:qrw_inlist2join_optmode

Determines whether to enable inlist-to-join query rewrite.

dn:qrw_inlist2join_optmode

Determines whether to enable inlist-to-join query rewrite.

cn:audit_xid_info

Determines whether to record the transaction IDs of SQL statements in detail_info. 0: The transaction IDs are not recorded. 1: The transaction IDs are recorded.

dn:audit_xid_info

Determines whether to record the transaction IDs of SQL statements in detail_info. 0: The transaction IDs are not recorded. 1: The transaction IDs are recorded.

cn:default_limit_rows

Limits the estimated number of rows for generating a generic plan. If this parameter is set to a negative value, the negative value is converted to a percentage, for example, -5 is equivalent to 5%, indicating the 5% rows of the total rows are returned.

dn:default_limit_rows

Limits the estimated number of rows for generating a generic plan. If this parameter is set to a negative value, the negative value is converted to a percentage, for example, -5 is equivalent to 5%, indicating the 5% rows of the total rows are returned.

cn:audit_dml_state_select

Determines whether to audit the SELECT operation.

dn:audit_dml_state_select

Determines whether to audit the SELECT operation.

cn:audit_dml_state

Determines whether to enable the audit of INSERT, UPDATE, and DELETE operations on a specific table. 0: These operations are not audited. 1: These operations are audited.

dn:audit_dml_state

Determines whether to enable the audit of INSERT, UPDATE, and DELETE operations on a specific table. 0: These operations are not audited. 1: These operations are audited.

cn:random_page_cost

Specifies the estimated cost for the optimizer to fetch an out-of-sequence disk page.

dn:random_page_cost

Specifies the estimated cost for the optimizer to fetch an out-of-sequence disk page.

cn:enable_security_policy

Controls whether unified audit and dynamic data masking policies are applied.

dn:enable_security_policy

Controls whether unified audit and dynamic data masking policies are applied.

cn:audit_set_parameter

Determines whether to audit the SET operation. 0: The SET operation is not audited. 1: The SET operation is audited.

dn:audit_set_parameter

Determines whether to audit the SET operation. 0: The SET operation is not audited. 1: The SET operation is audited.

cn:enable_pbe_optimization

Controls whether the optimizer optimizes the query plan for statements executed in Parse Bind Execute (PBE) mode.

dn:enable_pbe_optimization

Controls whether the optimizer optimizes the query plan for statements executed in Parse Bind Execute (PBE) mode.

wdr_snapshot_interval

Specifies the interval (in minutes) at which the backend thread Snapshot automatically performs snapshot operations on the database monitoring data.

enable_wdr_snapshot

Specifies whether to enable WDR snapshots.

cn:max_standby_archive_delay

Specifies how long a standby server waits when the queries that conflict with WAL processing and archiving in hot standby mode. The unit is ms.

dn:max_standby_archive_delay

Specifies how long a standby server waits when the queries that conflict with WAL processing and archiving in hot standby mode. The unit is ms.

cn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

dn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

cn:recovery_max_workers

Specifies the number of concurrent replay threads.

dn:recovery_max_workers

Specifies the number of concurrent replay threads.

cn:local_syscache_threshold

Specifies the size of system catalog cache in a session. Unit: KB

dn:local_syscache_threshold

Specifies the size of system catalog cache in a session. Unit: KB

cms:datastorage_threshold_value_check

Specifies the disk usage threshold to put a database node into read-only mode. If the disk usage of a data directory exceeds this threshold, the database node is automatically changed to read-only.

wdr_snapshot_retention_days

Specifies how many days database monitoring snapshots are saved for.

Table 4 Parameters for primary/standby instances

Parameter

Description

audit_system_object

Determines whether to audit the CREATE, DROP, and ALTER operations on GaussDB Kernel database objects. GaussDB Kernel database objects include databases, users, schemas, and tables. You can change the parameter value to audit only the operations on required database objects. During a forcible primary/standby failover, set audit_system_object to the maximum value and audit all DDL objects. If the parameter value is incorrectly changed, DDL audit logs will be lost. Contact technical support to change it.

autoanalyze

Specifies whether to automatically collect statistics on tables without statistics when a plan is generated.

autoanalyze_timeout

Specifies the autoanalyze timeout period, in seconds. If the duration of autoanalyze on a table exceeds the value of autoanalyze_timeout, the autoanalyze operation is automatically canceled. 0 indicates there is no timeout. The unit is second.

datestyle

Specifies the display format for date and time.

dn:wal_keep_segments

Specifies the minimum number of transaction log files stored in the pg_xlog directory. Standby nodes obtain the logs from the primary node to perform streaming replication.

enable_seqscan

Specifies whether to enable the optimizer's use of sequential scan plan types. It is impossible to completely suppress sequential scans, but setting this parameter to off allows the optimizer to choose other methods if available.

enable_slot_log

Specifies whether to enable primary/standby synchronization for logical replication slots.

failed_login_attempts

Specifies the maximum number of incorrect password attempts before an account is locked. The account will be automatically unlocked after the time specified in password_lock_time elapses. Only the sysadmin user can set this parameter.

log_min_duration_statement

Causes the duration of each completed statement to be logged if the statement ran for at least the specified number of milliseconds. The value -1 disables logging statement durations. If this parameter is set to a small value, the load throughput may be affected.

max_replication_slots

Specifies the number of log replication slots in the primary node.

max_wal_senders

The following processes occupy walsender threads: standby DNs connect to primary DNs to obtain physical logs, and logical replication tools connect to primary DNs to obtain logical logs. This parameter specifies the maximum number of walsender threads that can be created.

password_effect_time

Specifies the validity period of the password, in days.

password_lock_time

Determines how many days an account is locked.

session_timeout

Specifies how long to wait before a server connection is disconnected due to inactivity, in seconds. The value 0 indicates there is no time limit.

timezone

Specifies the time zone for displaying and interpreting time stamps.

update_lockwait_timeout

Specifies the maximum duration, in milliseconds, that a lock waits for concurrent updates on a row to complete when the concurrent update feature is enabled. If the lock wait time exceeds this value, the system will report an error.

wal_level

Specifies the level of information to be written to the WAL. This is a required value and cannot be commented out. Determines how much information is written to the WAL. When this parameter is set to logical, logical logs are extracted and primary key information is recorded in Xlogs.

dn:audit_thread_num

Specifies the number of audit threads. Value range: 1 to 48.

dn:qrw_inlist2join_optmode

Determines whether to enable inlist-to-join query rewrite.

dn:audit_xid_info

Determines whether to record the transaction IDs of SQL statements in detail_info. 0: The transaction IDs are not recorded. 1: The transaction IDs are recorded.

dn:default_limit_rows

Limits the estimated number of rows for generating a generic plan. If this parameter is set to a negative value, the negative value is converted to a percentage, for example, -5 is equivalent to 5%, indicating the 5% rows of the total rows are returned.

dn:audit_dml_state_select

Determines whether to audit the SELECT operation.

dn:audit_dml_state

Determines whether to enable the audit of INSERT, UPDATE, and DELETE operations on a specific table. 0: These operations are not audited. 1: These operations are audited.

dn:random_page_cost

Specifies the estimated cost for the optimizer to fetch an out-of-sequence disk page.

dn:enable_security_policy

Controls whether unified audit and dynamic data masking policies are applied.

dn:audit_set_parameter

Determines whether to audit the SET operation. 0: The SET operation is not audited. 1: The SET operation is audited.

dn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

dn:vacuum_defer_cleanup_age

Specifies the number of transactions used by VACUUM.

dn:enable_pbe_optimization

Controls whether the optimizer optimizes the query plan for statements executed in Parse Bind Execute (PBE) mode.

wdr_snapshot_interval

Specifies the interval (in minutes) at which the backend thread Snapshot automatically performs snapshot operations on the database monitoring data.

undo_retention_time

Specifies how long undo logs are kept, in seconds. This parameter is only used for flashback query. Note: 1. The undo space of the local disk increases. 2. In subsequent incremental backups, the size of the backup set increases, because extra undo content is retained.

track_stmt_stat_level

Controls the level of statement execution tracking.

enable_wdr_snapshot

Specifies whether to enable WDR snapshots.

dn:max_standby_archive_delay

Specifies how long a standby server waits when the queries that conflict with WAL processing and archiving in hot standby mode. The unit is ms.

dn:max_standby_streaming_delay

Specifies how long a standby node waits before canceling queries, in milliseconds.

dn:recovery_max_workers

Specifies the number of concurrent replay threads.

dn:recovery_time_target

Specifies the time for the standby node to write and replay logs. The unit is second.

dn:local_syscache_threshold

Specifies the size of system catalog cache in a session. Unit: KB

cms:datastorage_threshold_value_check

Specifies the disk usage threshold to put a database node into read-only mode. If the disk usage of a data directory exceeds this threshold, the database node is automatically changed to read-only.

wdr_snapshot_retention_days

Specifies how many days database monitoring snapshots are saved for.

log_autovacuum_min_duration

Specifies the interval which should elapse before autovacuum operations are logged. Autovacuum operations equal to or beyond the specified interval will be logged. If it is set to 0, all autovacuum operations will be logged. If it is set to -1, no autovacuum operations will be logged.