Miscellaneous Parameters
enable_default_ustore_table
Parameter description: Specifies whether the Ustore is used by default. This parameter is valid only when enable_ustore is enabled. If this parameter is set to on, all created tables are Ustore tables by default. If this parameter is set to off, all created tables are Astore tables by default. In upgrade scenarios, this parameter value after upgrade is consistent with that in the source version to ensure compatibility.
Parameter type: Boolean.
Unit: none
- on: The Ustore is used by default.
- off: The Ustore is not used by default.
Default value: on
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value.
Risks and impacts of improper settings: When using Ustore tables, you must enable the track_counts and track_activities parameters. Otherwise, space bloat may occur.
enable_ustore
Parameter description: Specifies whether to enable Ustore. If this parameter is set to on, Ustore tables can be created.
Parameter type: Boolean.
Unit: none
Value range:
- on: The Ustore is enabled.
- off: The Ustore is disabled.
Default value: on
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter is used for Ustore version control. You are advised not to change the value.
Risks and impacts of improper settings: When using Ustore tables, you must enable the track_counts and track_activities parameters. Otherwise, space bloat may occur.
enable_segment_datafile_preallocate
Parameter description: Specifies whether to allocate disk space immediately during segment-page file name extension.
Parameter type: Boolean.
Unit: none
Value range:
- on: The immediate disk space allocation mode is enabled. During file expansion, fallocate is preferentially used to allocate disk space immediately. If the system does not support fallocate, the byte-by-byte zero write mode is used to apply for disk space.
- off: The immediate disk space allocation mode is disabled. In this mode, disk space is not allocated immediately when a file is expanded, and the file increases in hole mode.
Default value: on
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.
consistency_check_module
Parameter description: Specifies the module that requires consistency check.
Parameter type: string.
Unit: none
Default value: 'off(ALL)'. That is, the verification of all modules is disabled by default.
Value range: If the module is enabled (on), consistency check is performed. If the module is disabled (off), consistency check is not performed. You can use SHOW consistency_check_module to view the status.
ALL,on(),off(INDEX)
Currently, only the INDEX module supports the verification. The INDEX module verifies the consistency between index tuples and heap table tuples during the B-tree index scan of the Astore table.
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
- First, you can use SHOW consistency_check_module to check which modules support verification. The output of the verification module is as follows:
1 2 3 4 5
gaussdb=# show consistency_check_module; consistency_check_module -------------------------- ALL,on(),off(INDEX) (1 row)
- Modules that can be verified are identified by uppercase letters, and the special ID ALL is used for setting all modules. You can use on or off to specify whether to perform verification. For example, to verify the consistency between indexes and heap tables, run the following commands:
1 2 3 4 5 6 7
gaussdb=# set consistency_check_module='on(INDEX)'; SET gaussdb=# show consistency_check_module; consistency_check_module -------------------------- ALL,on(INDEX),off() (1 row)
The command output shows that the INDEX check is enabled.
- The ALL identifier can be used to quickly enable or disable the verification of all modules.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
gaussdb=# set consistency_check_module='off(ALL)'; SET gaussdb=# show consistency_check_module; consistency_check_module -------------------------- ALL,on(),off(INDEX) (1 row) gaussdb=# set consistency_check_module='on(ALL)'; SET gaussdb=# show consistency_check_module; consistency_check_module -------------------------- ALL,on(INDEX),off() (1 row)
Setting suggestion: Enable the verification of the corresponding module as required.
Risks and impacts of improper settings: If this function is enabled, consistency check is performed during SQL execution, which takes extra time or affects performance. Exercise caution when enabling this function.
reserve_space_for_nullable_atts
Parameter description: Specifies whether to reserve space for the nullable attribute of an Ustore table.
Parameter type: Boolean.
Unit: none
Value range:
- on: Space is reserved for the nullable attribute of an Ustore table.
- off: Space is not reserved for the nullable attribute of an Ustore table.
Default value: on
Setting method: This is a USERSET 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.
block_size
Parameter description: Specifies the block size of the current database.
Parameter type: integer.
Unit: none
Value range: 8192
Default value: 8192
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
segment_size
Parameter description: Specifies the segment file size of the current database.
Parameter type: integer.
Unit: 8 KB
Value range: 131072
Default value: 131072, that is, 1 GB.
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
max_index_keys
Parameter description: Specifies the maximum number of index keys supported by the current database.
Parameter type: integer.
Unit: none
Value range: 32
Default value: 32
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
integer_datetimes
Parameter description: Specifies whether the date and time are in the 64-bit integer format.
Parameter type: Boolean.
Unit: none
Value range:
- on: The date and time format in 64-bit integer format is supported.
- off: The date and time format in 64-bit integer format is not supported.
Default value: on
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
lc_collate
Parameter description: Reports the string collation locale for the current database.
Parameter type: string.
Unit: none
Value range: a string.
Default value: Determined by the configuration during the cluster installation and deployment.
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
lc_ctype
Parameter description: Reports the locale settings for character types and case conversion in the current database. For example, it specifies what a letter and its upper-case equivalent are.
Parameter type: string.
Unit: none
Value range: a string.
Default value: Determined by the configuration during the cluster installation and deployment.
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
max_identifier_length
Parameter description: Specifies the maximum identifier length.
Parameter type: integer.
Unit: none
Value range: 63
Default value: 63
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
server_encoding
Parameter description: Specifies the database encoding (character set).
By default, gs_initdb will initialize the setting of this parameter based on the system environment during database creation. You can also run the locale command to check the current configuration environment.
Parameter type: string.
Unit: none
Value range: a string.
Default value: Determined by the system environment when the database is created.
Setting method: This is a fixed INTERNAL parameter. It can be viewed but cannot be modified.
Setting suggestion: This parameter can only be viewed.
Risks and impacts of improper settings: none
datanode_heartbeat_interval
Parameter description: Specifies the interval for sending heartbeat messages between heartbeat threads.
Parameter type: integer.
Unit: ms
Value range: 1000 to 60000
Default value: 1000 (that is, 1s)
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 1000 without a unit, datanode_heartbeat_interval indicates 1000 ms. If the value is 1s, datanode_heartbeat_interval indicates 1s. The unit must be ms, s, min, h, or d if required.
Setting suggestion: Set this parameter to a value less than or equal to the value of wal_receiver_timeout/2.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
dfs_partition_directory_length
Parameter description: Specifies the maximum directory name length for the partition directory of a table partitioned by VALUE in the HDFS.
Parameter type: integer.
Unit: none
Value range: 92 to 7999
Default value: 512
Setting method: This is a USERSET 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.
max_concurrent_autonomous_transactions
Parameter description: 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.
Parameter type: integer.
Unit: none
Value range: 0 to 10000. The theoretical maximum value is 10000, and the actual maximum value is a dynamic value. The calculation formula is 262143 – job_queue_processes – autovacuum_max_workers – max_inner_tool_connections – max_connections – AUXILIARY_BACKENDS – AV_LAUNCHER_PROCS. The values of job_queue_processes, autovacuum_max_workers, max_inner_tool_connections, and max_connections depend on the settings of the corresponding GUC parameters. AUXILIARY_BACKENDS indicates the number of reserved auxiliary threads and is fixed at 20. AV_LAUNCHER_PROCS indicates the number of launcher threads reserved for autovacuum and is fixed at 2.
Default value:
Independent deployment: 80 (60-core CPU/480 GB memory); 40 (32-core CPU/256 GB memory); 20 (16-core CPU/128 GB memory); 10 (8-core CPU/64 GB memory, 4-core CPU/32 GB memory, 4-core CPU/16 GB memory)
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Suggestion: Set this parameter based on actual service requirements and hardware configurations. It is recommended that this parameter be set to a value less than or equal to 1/10 of max_connections. If you only increase the value of this parameter but do not adjust the memory parameters in the same proportion, the memory may be insufficient and the error message "memory is temporarily unavailable" is displayed when the service load is heavy.
Risks and impacts of improper settings: If the value range of this parameter is changed during the upgrade and the value is changed before the commit operation, you need to change the value range to the value allowed before the upgrade if you roll back the upgrade. Otherwise, the database may fail to be started.
cluster_run_mode
Parameter description: Specifies whether a CN or DN belongs to the primary or standby cluster in a dual-cluster DR scenario. The default value is used for a single cluster.
Value type: enumerated type.
Unit: none
Value range:
- cluster_primary: The node is in the primary cluster.
- cluster_standby: The node is in the standby cluster.
Default value: cluster_primary
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Mark the parameter used by the standby cluster for DR. You are advised not to set the parameter.
Risks and impacts of improper settings: After the modification, the standby cluster for DR may be abnormal.
enable_gpi_auto_update
Parameter description: Determines whether global indexes are updated by default in partition DDL commands.
Parameter type: Boolean.
Unit: none
Value range:
- on: Global indexes are updated regardless of whether the partition DDL commands contain the UPDATE GLOBAL INDEX clause.
- off: Global indexes are not updated unless the partition DDL commands contain the UPDATE GLOBAL INDEX clause.
Default value: off
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Set this parameter based on service requirements.
Risks and impacts of improper settings: If this parameter is set to off and the partition DDL does not contain the UPDATE GLOBAL INDEX clause, the global index is unavailable. This parameter must be set to the same value on CNs and DNs. Otherwise, the global index function may be abnormal.
enable_gpi_fast_prune
Parameter description: Controls whether the global partitioned index (GPI) of a Ustore table removes dead tuples left by previous DDL operations during DML processing.
Parameter type: Boolean
Unit: none
Value range:
- on: Junk tuples generated by DDL operations are cleared not only using the AUTOVACUUM thread but also when the index page space is insufficient during DML operations.
- off: Junk tuples generated by DDL operations are cleared only using the AUTOVACUUM thread.
Default value: on
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Set this parameter based on service requirements. If the service has partitioned tables and GPIs, and there are a large number of DDL and DML operations, you are advised to enable this parameter. If the partitioned table of the service does not have GPIs or DDL operations are not performed on the partitioned table, you are advised to disable this parameter.
Risks and impacts of improper settings: If this parameter is set to off, only the autovacuum thread handles DDL garbage, which may cause the GPI to bloat.
enable_cluster_resize
Parameter description: Specifies the unique identifier of the scale-out tool in the kernel. If this parameter is enabled, the current session is connected to the scale-out tool.
Parameter type: Boolean.
Unit: none
Value range:
- on: The current session is connected to the scale-out tool.
- off: The current session is not connected to the scale-out tool.
Default value: off
Setting method: This is a SUSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter is used for internal O&M. Do not set it to on unless absolutely necessary.
Risks and impacts of improper settings: If this parameter is forcibly set to on, the kernel considers that the current session is a scale-out tool and can execute scale-out-related system functions or DDL APIs, which may cause misuse.
change_cluster_mode
Parameter description: Specifies whether the cluster is in the mode switchover process. Mode switchover refers to: A cluster with one primary and two standby nodes is switched to a cluster with one primary node, one standby node, and one log; a cluster with one primary node, one standby node, and one log is switched to a cluster with one primary and two standby nodes; standby DNs and log DNs in a cluster with one primary node, one standby node, and one log are switched to each other.
Parameter type: integer.
Unit: none
Value range: 0 to 2147483647
- The value 0 indicates that the cluster mode is not being switched.
- The value 1 indicates that the cluster mode is being switched.
- Other values are meaningless and have the same effect as the value 0.
Default value: 0
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter specifies whether the read function of the standby node in a distributed system is available. If this parameter is set to 1, the read function of the standby node in a distributed system cannot be used. Exercise caution when setting this parameter.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
enable_partrouting_optimization
Parameter description: Specifies whether to optimize the insertion of partitioned tables.
Parameter type: Boolean.
Unit: none
Value range:
- on: The insertion of partitioned tables is optimized. For the INSERT and SELECT statements, if the SELECT statement contains a constant partition key, partition routing needs to be performed only once for the INSERT statement, improving performance.
- off: The insertion of partitioned tables is not optimized. Before inserting each piece of data, you need to perform partition routing to determine the partitioned table to be inserted.
Default value: on
Setting method: This is a USERSET 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, the performance optimization effect brought by this parameter is not affected in some scenarios where data is inserted into partitioned tables.

- Only INSERT and SELECT statements are supported.
- INSERT INTO ta SELECT FROM tb: For all partition key values inserted to table a, the column values in the corresponding SELECT result set must be constants. (This column is optional because the default values are constants.)
- INSERT INTO ta SELECT c,d FROM b WHERE tb.c='1' or SELECT '1' as c, d FROM tb: The result column tb.c is a constant.
- INSERT INTO ta SELECT c,d FROM b WHERE tb.c=func('1');: If func() is neither a volatile function nor a stable/immutable function that contains non-constant parameters, tb.c can be determined as a constant.
- If the column value is the return value of an aggregate function, for example, INSERT INTO ta SELECT count(c),d FROM b WHERE tb.c='1' group by c, d;, the count(c) cannot be determined as a constant.
- The UPSERT clause is not supported.
- Tables that contain BEFORE and INSTEAD triggers are not supported because the data to be inserted may be changed.
enable_unique_checking_of_unusable_index
Parameter description: Specifies whether to block the insert and update operations when there is an unusable unique index in the table.
Parameter type: Boolean
Unit: none
Value range:
- on: If a table contains an UNUSABLE unique index, an INSERT statement and an UPDATE statement that involves the index will report an error, prompting you to process the unusable unique index first.
- off: If a table contains an UNUSABLE unique index, INSERT and UPDATE statements that involve the index will not report errors.
Default value: off
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Set this parameter based on service requirements. You are advised to set it to on.
Risks and impacts of improper settings: If this parameter is enabled, a large number of errors may be reported to ensure the uniqueness constraint. If this parameter is disabled, duplicate data in the unique index column is inserted into the table. As a result, the index cannot be rebuilt.

- For an Astore table, an error is reported when an index column of a non-UNUSABLE index is updated because a new tuple is generated.
- For a Ustore non-partitioned table, no error is reported when the index column of a non-UNUSABLE index is updated. If the update is not performed in place, an error is reported when the index column of a non-UNUSABLE index is updated.
- For a Ustore partitioned table, when the UNUSABLE unique index is a global index, an error is reported if the new data and old data are not in the same partition after the partition key is updated because a new tuple is generated.
- For a Ustore partitioned table, if the UNUSABLE unique index is a local index that contains the partition key, an error is reported when the partition key is updated.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot