Skip to main content

Klustron System Variables

KlustronAbout 15 min

Klustron System Variables

In the Klustron cluster, there are two types of system variables: those for compute nodes and those for storage nodes. This section provides a detailed description of these two categories of system variables.

1. Compute Node kunlun-server System Variables

The Klustron cluster maintains many system variables that affect operations. In compute nodes, most system variables can be configured at startup through the configuration file loaded by kunlun-server, or dynamically adjusted during runtime using the SET statement and the RELOAD method. Before making any modifications, it is essential to thoroughly understand the actual meaning, application configuration methods, and types of these system variables to avoid configuration failures or more severe impacts on the usage of Klustron.

In Klustron clusters, the compute nodes employ various methods for setting application system variables. These methods are presented in descending order of configuration complexity:

  • Internal: These settings cannot be directly changed as they reflect internally determined values. Some may be altered by rebuilding the server with different configuration options or by changing the options provided to initdb.

  • Postmaster: These options are only used at server startup, so any changes require a server restart. The values for these settings are typically stored in the postgresql.conf file or passed to the command line when the server starts. Settings of any lower context type can also be set at server startup. For Postmaster configuration type system variables, changes need to be made using the alter system set statement followed by a restart of the kunlun-server to take effect and will persist in the configuration file. Opening new sessions will apply the modified values. Note that using the set command to modify these settings will result in an error.

  • Sighup: These settings can be changed in postgresql.conf without restarting the server. Send a Sighup signal to the main process to make it re-read postgresql.conf and apply the changes. The main process also passes the Sighup signal to its child processes, so they all use the new values. For Sighup configuration type system variables, changes are made using the alter system set statement, followed by a reload, which will take immediate effect in the current session and will persist in the configuration file. New sessions or a restart of the kunlun-server will apply the modified values. Note that using the set command to modify these settings will result in an error.

  • Backend: These settings can be changed in postgresql.conf without restarting the server; they can also be set for a specific session in the connection request package (for example, via libpq's PGOPTIONS environment variable). However, these settings will never change after the session starts. If you change them in postgresql.conf, send a Sighup signal to the main process to make it re-read postgresql.conf. New values will only affect subsequently loaded sessions. For Backend configuration type system variables, changes need to be made using the alter system set statement followed by a reload, which will take effect for new sessions opened afterwards, but not for the current session. Changes will persist in the configuration file, and a restart of the kunlun-server will apply the modified values. Note that using the set command to modify these settings will result in an error.

  • SuperUser These values can be set in postgresql.conf or within a session using the SET command; however, only superusers can change them through SET. Changes in postgresql.conf will only affect existing sessions if no session-local values were established using SET. For SuperUser configuration type system variables, only superusers can execute changes using the set command, which takes immediate effect in the current session. Changes can also be made using the alter system set statement followed by a reload, taking immediate effect in the current session and persisting in the configuration file. New sessions or a restart of the kunlun-server will apply the modified values.

  • User: These values can be set in postgresql.conf or within a session using the SET command. Any user is allowed to change their session-local values. Changes in postgresql.conf will only affect existing sessions if no session-local values were established using SET. For User configuration type system variables, users can execute changes using the set command, which takes immediate effect in the current session. Changes can also be made using the alter system set statement followed by a reload, taking immediate effect in the current session and persisting in the configuration file. New sessions or a restart of the kunlun-server will apply the modified values.

Tips:

  • System variables are persisted through the reload method, as detailed in the System Variables FAQ section.
  • Among all system variables, some are specific to Klustron. This document only introduces those unique to Klustron compute nodes.

Klustron Specific System Variables

Variable Nameautocommit
DescriptionEnables or disables auto-commit mode.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Namecheck_primary_interval_secs
DescriptionInterval for checking all storage and metadata shard primary nodes.
Variable TypeInteger
Default Value3
Valid Range[1,100]
Configuration RequirementUser
Version Introducedv1.2
Variable Nameclient_connection_type
DescriptionSpecifies whether client connections are MySQL or PostgreSQL.
Variable TypeEnumeration
Default ValueFE_PG
Valid OptionsFE_UNKNOWN,FE_PG,FE_MYSQL
Configuration RequirementUser
Version Introducedv1.2
Variable Namecluster_commitlog_group_size
DescriptionGroup size for writing xid to the commit log.
Variable TypeInteger
Default Value8
Valid Range[1,67108864]
Configuration RequirementPostmaster
Version Introducedv1.2
Variable Namecomp_node_id
DescriptionAssigned to the compute node during its creation.
Variable TypeInteger
Default Value
Valid Range[0,2147483647]
Configuration RequirementPostmaster
Version Introducedv1.2
Variable Namedebug_remote_connection
DescriptionDisplays, in the form of a Notice, which shards are accessed during the execution of SQL for debugging purposes.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Namedeclared_mysql_server_version
DescriptionDeclares the MySQL version that Klustron presents to MySQL client connectors.
Variable TypeString
Default Value8.0.29
Configuration RequirementSighup
Version Introducedv1.2
Variable Namedefault_nulls_smallest
DescriptionTreats nulls as the smallest value in ascending order by default.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Namedefault_pgsql_collation
DescriptionUses the default PostgreSQL collation for the MySQL session if no valid PostgreSQL collation is found in the pg_MySQL_collation_mapping for a given MySQL charset and collation.
Variable TypeString
Default Valueucs_basic
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_block_nestloop
DescriptionEnables block nest loop functionality to reduce interactions with storage nodes.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_catalog_security_policy
DescriptionAdds row-level security checks for system catalog relations to prevent users from seeing names of objects they are not authorized to access (e.g., table names).
Variable TypeBoolean
Default ValueOFF
Configuration RequirementPostmaster
Version Introducedv1.2
Variable Nameenable_collation_pushdown
DescriptionPushes down collation to storage nodes.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_coredump
DescriptionGenerates a core dump file when any PostgreSQL process captures a fatal signal, which is very useful for diagnosing errors.
Variable TypeBoolean
Default ValueON
Configuration RequirementSighup
Version Introducedv1.2
Variable Nameenable_debug_remote_path
DescriptionUsed for optimizer debugging. Displays all alternative remote operators generated during the query optimization process.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_flatten_correlated_sublink
DescriptionFlattens any subquery correlated to semi-joins.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_global_deadlock_detection
DescriptionEnables global deadlock detection and resolution.
Variable TypeBoolean
Default ValueON
Configuration RequirementSighup
Version Introducedv1.2
Variable Nameenable_global_mvcc
DescriptionEnables global MVCC feature.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementPostmaster
Version Introducedv1.2
Variable Nameenable_olap_mode
DescriptionSets parameters to optimize OLAP workloads.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_parallel_remotescan
DescriptionConsiders remote scan plans as parallel-safe to enhance parallelism.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_pg_mysql_charset_mapping_deduction
DescriptionDetermines whether to use mappings deduced from documentation and public information.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_remote_agg_pushdown
DescriptionAttempts to push down aggregation to storage shards for better performance.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_remote_cursor
DescriptionUses cursors to fetch tuples from remote shards, assuming enable_shard_binary_protocol is set.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_remote_distinct_pushdown
DescriptionAttempts to push down the DISTINCT clause to storage shards for improved performance.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_remote_indexscan
DescriptionAttempts to create remote index scan plans.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_remote_join_pushdown
DescriptionAttempts to push down table joins when both left and right tables are located in the same storage shard.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_remote_limit_pushdown
DescriptionAttempts to push down the LIMIT clause to storage shards for better performance.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_remote_orderby_pushdown
DescriptionAttempts to push down the ORDER BY to storage shards for improved performance.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_replica_read
DescriptionEnables reading from replicas to reduce the read load on the primary.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_shard_binary_protocol
DescriptionWhen the client uses the binary protocol to communicate with the compute node, the compute node also uses the MySQL binary protocol to communicate with shards.
Variable TypeBoolean
Default ValueON
Configuration RequirementSuperUser
Version Introducedv1.2
Variable Nameenable_sql_log
DescriptionLogs SQL sent to storage shards to a separate SQL log for easier issue troubleshooting.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Nameenable_stacktrace
DescriptionPrints stack traces to the server log files when any PostgreSQL process captures a fatal signal, useful for diagnosing errors.
Variable TypeBoolean
Default ValueON
Configuration RequirementSighup
Version Introducedv1.2
Variable Nameenable_stmt_subxact
DescriptionWraps user queries in internal sub-transactions, rolling back the sub-transaction in case of an error, instead of rolling back the entire transaction.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Nameforce_remote_sql_parameterize
DescriptionParameterizes all constants in the pushed-down SQL, using the binary protocol for communication with storage nodes.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementSuperUser
Version Introducedv1.2
Variable Nameforce_secure_file_access_proc
DescriptionForces the use of Unix sockets when invoking file access functions.
Variable TypeBoolean
Default ValueON
Configuration RequirementSighup
Version Introducedv1.2
Variable Nameglobal_deadlock_detector_victim_policy
DescriptionDetermines how the global deadlock detector selects a victim to terminate in order to resolve global deadlocks.
Variable TypeEnumeration
Default ValueKILL_MOST_ROWS_LOCKED
Valid OptionsKILL_OLDEST,KILL_YOUNGEST,KILL_MOST_ROWS_CHANGED,KILL_LEAST_ROWS_CHANGED,KILL_MOST_ROWS_LOCKED,KILL_MOST_WAITING_BRANCHES,KILL_MOST_BLOCKING_BRANCHES
Configuration RequirementSighup
Version Introducedv1.2
Variable Nameglobal_txn_commit_log_wait_max_secs
DescriptionTimeout for writing transaction logs to the metadata server during two-phase commits.
Variable TypeInteger
Default Value10
Valid Range[1,100000]
UnitSeconds
Configuration RequirementUser
Version Introducedv1.2
Variable Namegtss_concurrency
DescriptionThe number of coroutines used for writing to the commit log.
Variable TypeInteger
Default Value4
Valid Range[1,8]
Configuration RequirementPostmaster
Version Introducedv1.2
Variable Nameinternal_read_only_double_quotes_symbols
DescriptionDetermines if the current session uses double quotes (") to reference database objects (such as tables, columns, functions) (true) or string literals (false).
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Namemax_remote_insert_blocks
DescriptionThe maximum length of insert statements when compute nodes insert data into storage nodes.
Variable TypeInteger
Default Value1024
Valid Range[8,1048576]
Configuration RequirementUser
Version Introducedv1.2
Variable Namemetadata_connect_timeout
DescriptionTimeout for connecting to the metadata server.
Variable TypeInteger
Default Value20
Valid Range[1,100000]
UnitSeconds
Configuration RequirementUser
Version Introducedv1.2
Variable Namemetadata_read_timeout
DescriptionTimeout for reading from the metadata server.
Variable TypeInteger
Default Value20
Valid Range[1,100000]
UnitSeconds
Configuration RequirementUser
Version Introducedv1.2
Variable Namemetadata_write_timeout
DescriptionTimeout for writing to the metadata server.
Variable TypeInteger
Default Value20
Valid Range[1,100000]
UnitSeconds
Configuration RequirementUser
Version Introducedv1.2
Variable Namemin_remote_index_paralleism
DescriptionMinimum parallelism for remote index scan operators.
Variable TypeInteger
Default Value0
Valid Range[0,1024]
Configuration RequirementUser
Version Introducedv1.2
Variable Namemysql_ansi_quotes
DescriptionUses double quotes (") to reference symbol names rather than string constants.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Namemysql_default_schema
DescriptionThe default schema for MySQL connections established at connection time. If empty, the same operation as with PostgreSQL connections is performed and set to "$User, public".
Variable TypeString
Default Value
Configuration RequirementUser
Version Introducedv1.2
Variable Namemysql_interactive_timeout
DescriptionTimeout for waiting for the next command from the mysql CLI program before disconnecting.
Variable TypeInteger
Default Value1800
Valid Range[1,2000000000]
UnitSeconds
Configuration RequirementUser
Version Introducedv1.2
Variable Namemysql_net_buffer_length
DescriptionSize of the read/write buffer for each client connection using the MySQL server protocol.
Variable TypeInteger
Default Value65536
Valid Range[16384,1048576]
UnitBytes
Configuration RequirementBackend
Version Introducedv1.2
Variable Namemysql_net_retry_count
DescriptionNumber of retries for connecting/writing/reading with peers.
Variable TypeInteger
Default Value10
Valid Range[1,1000000]
Configuration RequirementUser
Version Introducedv1.2
Variable Namemysql_port
DescriptionSets the TCP port on which the server listens for MySQL client connections using the MySQL protocol.
Variable TypeInteger
Default ValueUser-specified
Valid Range[1,65535]
Configuration RequirementPostmaster
Version Introducedv1.2
Variable Namemysql_protocol_compression_algos
DescriptionCompression algorithms used by MySQL, can only be a combination of 'zlib', 'zstd', and 'uncompressed'.
Variable TypeString
Default Valuezlib, zstd, uncompressed
Configuration RequirementUser
Version Introducedv1.2
Variable Namemysql_protocol_ps_exec_fetch_rows
DescriptionHow many rows to fetch in an EXECUTE or FETCH command through the MySQL binary protocol; if 0, all rows are fetched in EXECUTE.
Variable TypeInteger
Default Value0
Valid Range[0,2147483647]
Configuration RequirementUser
Version Introducedv1.2
Variable Namemysql_send_resultset_metadata
DescriptionWhether to send result set metadata for connections using the MySQL protocol.
Variable TypeBoolean
Default ValueON
Configuration RequirementSuperUser
Version Introducedv1.2
Variable Namemysql_wait_timeout
DescriptionTimeout for waiting for the next command from a mysql client before disconnecting.
Variable TypeInteger
Default Value1800
Valid Range[1,2000000000]
UnitSeconds
Configuration RequirementUser
Version Introducedv1.2
Variable Namenet_motion_cost
DescriptionThe cost for the compute node to read a 4KB data block from a storage node, used for optimizer cost estimation.
Variable TypeReal
Default Value1
Valid Range[0,1.79769e+308]
Configuration RequirementUser
Version Introducedv1.2
Variable Namenet_motion_penalty
DescriptionThe penalty value for each interaction between compute nodes and storage nodes, used for optimizer cost estimation.
Variable TypeReal
Default Value100
Valid Range[0,1.79769e+308]
Configuration RequirementUser
Version Introducedv1.2
Variable Nameonly_full_group_by
DescriptionRejects queries where the SELECT list, HAVING condition, or ORDER BY list references non-aggregated columns that are neither named in the GROUP BY clause nor are functionally dependent on them.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2
Variable Nameplan_cache_mode
DescriptionControls the planner's choice between custom or generic plans.
Variable TypeEnumeration
Default Valueauto
Valid Optionsauto,force_generic_plan,force_custom_plan
Configuration RequirementUser
Version Introducedv1.2
Variable Nameremote_cursor_prefetch_rows
DescriptionThe number of rows fetched in batches by the compute node using a cursor from the storage node.
Variable TypeInteger
Default Value1000
Valid Range[1,2147483647]
Configuration RequirementUser
Version Introducedv1.2
Variable Nameremote_print_warning
DescriptionEnables warnings if certain operators/functions cannot be pushed down to storage nodes.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Namereplica_read_fallback
DescriptionSpecifies the fallback strategy when read-write separation is enabled and no replicas are available for reading: 0: Error; 1: Any replica; 2: Primary node.
Variable TypeInteger
Default Value2
Valid Range[0,3]
Configuration RequirementUser
Version Introducedv1.2
Variable Namereplica_read_latency_threshold
DescriptionThe binlog synchronization delay threshold for replicas to be considered available for read operations under read-write separation.
Variable TypeReal
Default Value0
Valid Range[0,1e+10]
Configuration RequirementUser
Version Introducedv1.2
Variable Namereplica_read_order
DescriptionDefines how to sort replicas by priority for selection (higher priority means higher likelihood of selection) when read-write separation is enabled: 0: ro_weight; 1: ping latency; 2: binlog sync delay.
Variable TypeInteger
Default Value0
Valid Range[0,3]
Configuration RequirementUser
Version Introducedv1.2
Variable Namereplica_read_ping_threshold
DescriptionThe ping latency threshold from the current compute node to a replica that can be used for replica reading when read-write separation is enabled.
Variable TypeReal
Default Value0
Valid Range[0,1e+10]
Configuration RequirementUser
Version Introducedv1.2
Variable Namesharding_policy
DescriptionThe strategy for placing tables on shards: 0: Random; 1: Least Storage; 2: Fewest Tables; 3: First Shard.
Variable TypeInteger
Default Value0
Valid Range[0,5]
Configuration RequirementUser
Version Introducedv1.2
Variable Namesingle_shard_mode
DescriptionA cluster deployment mode when the cluster has only one shard. In this mode, compute nodes modify only local metadata during DDL operations, allowing users to freely define the mapping between compute node schemas and storage node schemas.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementPostmaster
Version Introducedv1.2
Variable Namesql_auto_is_null
DescriptionFor MySQL compatibility, always false.
Variable TypeBoolean
Default ValueOFF
Configuration RequirementUser
Version Introducedv1.2
Variable Namestart_global_deadlock_detection_wait_timeout
DescriptionIf an insert, delete, or update statement sent to a storage shard has not returned after this duration, initiate a round of deadlock detection.
Variable TypeInteger
Default Value500
Valid Range[1,2147483647]
Configuration RequirementUser
Version Introducedv1.2
Variable Namesynchronize_meta_data_interval_secs
DescriptionSets the interval for synchronizing metadata from the meta cluster.
Variable TypeInteger
Default Value60
Valid Range[1,1000]
UnitSeconds
Configuration RequirementUser
Version Introducedv1.2
Variable Nametable_migration_recovery_max_retries
DescriptionThe maximum number of retries when a storage node reports a NO_SUCH_TABLE error due to table migration.
Variable TypeInteger
Default Value8
Valid Range[0,16]
Configuration RequirementUser
Version Introducedv1.2
Variable Nametransform_create_db_to_schema
DescriptionIn MySQL connections, transforms all CREATE DATABASE statements into CREATE SCHEMA statements.
Variable TypeBoolean
Default ValueON
Configuration RequirementUser
Version Introducedv1.2

2. Storage Node kunlun-storage System Variables

In the Klustron cluster, many system variables impact operations. On storage nodes, most system variables can be configured at startup through the configuration file loaded by kunlun-storage, and they can also be dynamically adjusted during runtime using the set and set global commands. Before making any modifications, it is crucial to fully understand the actual meanings, scopes of application, and variable types of these system variables to avoid configuration failures or more severe impacts on the usage of Klustron. Adjustments to system variables on storage nodes should be made with caution, and it is advisable to consult the Klustron team before making changes.

In Klustron's storage nodes, the scope of setting system variables is divided into two levels, Session and Global, consistent with the setting methods in MySQL:

  • Session level: Modifying session-level variables through the set command takes immediate effect within the current session until changed to another value or the session is reopened. This change does not affect other sessions.
  • Global level: Modifying system variables at the global level through the set global command will persist the changes in the storage nodes. These changes affect only system variables that have a global scope and take immediate effect; if the variable has both global and session scopes, the modified value will not affect the current connection session, which will continue to use the session variable value from that session. It will only affect sessions that are opened after the changes are made.

Klustron-Specific System Variables

The following system variables are unique to Klustron storage nodes and do not include MySQL's system variables.

Variable Namegmvcc_register_txns_at_readview_creation
DescriptionRegisters transactions whose TGVC entries are cached into each read view upon creation, trading off increased memory usage for better performance.
Variable TypeBoolean
Default ValueFALSE
ScopeGlobal
Dynamic ModificationNo
Version Introducedv1.2
Variable Nameenable_fullsync
DescriptionWhether to globally enable the fullsync mechanism or enable it in the current session.
Variable TypeBoolean
Default ValueTRUE
ScopeGlobal,Session
Dynamic ModificationYes
Version Introducedv1.2
Variable Namefullsync_timeout
DescriptionIf the replica acknowledgment has not arrived within this many milliseconds since the transaction began, return an error to the client and write an error in the error log.
Variable TypeInteger
Default Value30000
Valid Range[5,4294967295]
UnitMilliseconds
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Namefullsync_warning_timeout
DescriptionWrite a warning in the error log if a replica acknowledgment has taken this many milliseconds to arrive since the transaction began.
Variable TypeInteger
Default Value3000
Valid Range[3,4294967295]
UnitMilliseconds
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Nameskip_fullsync_replica_acks_older_than
DescriptionSkip fsyncing relay logs or sending acknowledgments if replicas are this many milliseconds behind the primary nodes.
Variable TypeInteger
Default Value3600000
Valid Range[0,4294967295]
UnitMilliseconds
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Namefullsync_fsync_ack_wait_max_milli_secs
DescriptionThe maximum milliseconds a replica node waits for more event groups to arrive before fsync'ing relay logs and sending ACK.
Variable TypeInteger
Default Value2
Valid Range[0,4294967295]
UnitMilliseconds
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Namefullsync_fsync_ack_least_txns
DescriptionAccumulate at least this many event groups before fsyncing relay logs and sending ACK.
Variable TypeInteger
Default Value10
Valid Range[0,4294967295]
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Namefullsync_fsync_ack_least_event_bytes
DescriptionAccumulate at least this many bytes of relay logs before fsyncing and sending ACK.
Variable TypeInteger
Default Value4096
Valid Range[0,4294967295]
UnitBytes
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Namefullsync_relaylog_fsync_ack_level
DescriptionThis variable's value is assigned to replica channels upon creation to determine when to enable full synchronization, and whether the replica channel should fsync relay logs and/or reply with an ACK to its primary channel after writing its received event groups to its relay log file. Options are: 0: Do not fsync or send ACK; 1: Do not fsync but send ACK; 2: Fsync and send ACK. To change channel-specific settings later, execute CHANGE MASTER TO FULLSYNC_RELAY_LOG_FSYNC_ACK_LEVEL={0|1|2} [FOR CHANNEL 'xxx']。
Variable TypeInteger
Default Value2
Valid Range[0,2]
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Namefullsync_consistency_level
DescriptionDetermines whether and how to wait for full sync replica ACKs before replying to the client that the transaction has committed, at the end of the transaction commit. Options: 0: Do not wait; Positive: Wait for this number of ACKs.
Variable TypeInteger
Default Value1
Valid Range[0,1024]
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Namebg_worker_threads
DescriptionNumber of background worker threads.
Variable TypeInteger
Default Value16
Valid Range[4,256]
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Nameslow_logging_start_point
DescriptionStart point for logging slow queries: 2: Query reception; 1: Query start; or 0: After locking, to the end time.
Variable TypeInteger
Default Value2
Valid Range[0,2]
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2
Variable Nameprint_extra_info_verbosity
DescriptionLevel of detail for printing extra information to assist in problem diagnosis, including disconnect information, newly added log event fields, etc. The higher the number, the more detailed/printed information; 0 will disable printing any detailed information.
Variable TypeInteger
Default Value1
Valid Range[0,100000]
ScopeGlobal
Dynamic ModificationYes
Version Introducedv1.2

System Variables FAQ

1. How to perform the reload configuration method?

A: In Klustron, adjusting system variables sometimes requires restarting the kunlun-server, while others can be persisted into the compute nodes by reloading the configuration.

  • Reload method

For example, to modify the system variable statement_timeout, first log into the kunlun-server and check its default value:

show statement_timeout;

Example:

Check the type of system variable value modification:

select * from pg_settings where name='statement_timeout';

Example:

Modify the configuration value:

alter system set statement_timeout = 200000;

Example:

Check the kunlun-server process, identify the directory where the pg_ctl tool is located. Here, using the port number 23007 as an example:

ps -ef|grep 23007

Example:

Locate the directory of pg_ctl:

cd /data/ha/kunlun/instance_binaries/computer/23007/Klustron-server-1.2.1/bin
ls -l

Example:

Execute reload:

./pg_ctl -D /data/ha/kunlun/server_datadir/23007 reload

Example:

Verify if the adjustment was successful by logging into the kunlun-server and checking the system variable default value:

show statement_timeout ;

Example:

Note: There may be multiple kunlun-servers, so the same steps need to be followed on other kunlun-servers to ensure all system variable configuration values are consistent across all compute nodes. Adjust accordingly for specific user requirements.

  • Restart method

Here, using the system variable cluster_commitlog_delay_ms as an example, first log into the kunlun-server to check its default value:

show cluster_commitlog_delay_ms;

Example:

Check the type of system variable value modification:

select * from pg_settings where name='cluster_commitlog_delay_ms';

Example:

Modify the configuration value:

alter system set cluster_commitlog_delay_ms=11;

Example:

Check the kunlun-server process, confirm the directory of pg_ctl. Here, using the port number 23001 as an example:

ps -ef|grep 23001

Example:

Locate the directory of pg_ctl:

cd /data/ha/kunlun/instance_binaries/computer/23001/Klustron-server-1.2.1/scripts
ls -l

Example:

Execute the restart of kunlun-server:

Stop:

python2 stop_pg.py --port=23001

Example:

Start:

python2 start_pg.py --port=23001

Verify successful startup:

ps -ef|grep 23001

Example:

Verify if the adjustment was successful by logging into the kunlun-server and checking the system variable default value:

show cluster_commitlog_delay_ms ;

Example:

Note: There may be multiple kunlun-servers, so the same steps need to be followed on other kunlun-servers to ensure all system variable configuration values are consistent across all compute nodes. Adjust accordingly for specific user requirements.

END