Skip to main content

View and configure runtime parameters

What are runtime parameters?

Runtime parameters are variables that can be set at runtime to configure the behavior of RisingWave.

How to view runtime parameters?

You can use the SHOW ALL command to view the runtime parameters, their current settings, and some notes about these parameters.

SHOW ALL;

For example, you may see a table similar to this:

Runtime Parameters
          Name                  |     Setting     |        Description
--------------------------------+-----------------+--------------------------------------
rw_implicit_flush | false | If `RW_IMPLICIT_FLUSH` is on, then every INSERT/UPDATE/DELETE statement will block until the entire dataflow is refreshed.
create_compaction_group_for_mv | false | If `CREATE_COMPACTION_GROUP_FOR_MV` is on, dedicated compaction groups will be created in MV creation.
query_mode | auto | A temporary config variable to force query running in either local or distributed mode. If the value is auto, the system will decide for you automatically.
...

Below is the detailed information about the parameters you may see after using the SHOW ALL command:

NameValues or value examplesDescription
rw_implicit_flushtrue/falseIf RW_IMPLICIT_FLUSH is on, then every INSERT/UPDATE/DELETE statement will block until the entire dataflow is refreshed. In other words, every related table & MV will be able to see the write.
create_compaction_group_for_mvtrue/falseIf CREATE_COMPACTION_GROUP_FOR_MV is on, dedicated compaction groups will be created in MV creation.
query_modeautoA temporary config variable to force query running in either local or distributed mode. The default value is auto which means let the system decide to run batch queries in local or distributed mode automatically.
extra_float_digits1Set the number of digits displayed for floating-point values. See here for details.
application_namepsqlSet the application name to be reported in statistics and logs. See here for details.
datestyleDMYIt is typically set by an application upon connection to the server. See here for details.
rw_batch_enable_lookup_jointrue/falseForce the use of lookup join instead of hash join when possible for local batch execution.
rw_batch_enable_sort_aggtrue/falseEnable usage of sortAgg instead of hash agg when order property is satisfied in batch execution.
batch_enable_distributed_dmltrue/falseEnable distributed DML, allowing INSERT/UPDATE/DELETE statements to be executed in a distributed way, such as running on multiple compute nodes. Defaults to false.
max_split_range_gap8The max gap allowed to transform small range scan into multi point lookup.
search_path"$user", publicSet the order in which schemas are searched when an object (table, data type, function, etc.) is referenced by a simple name with no schema specified. See here for details.
visibility_modedefaultIf VISIBILITY_MODE is all, we will support querying data without checkpoint.
transaction_isolationread committedSee here for details.
query_epoch0Select as of specific epoch. Sets the historical epoch for querying data. If 0, querying latest data.
timezoneUTCSession timezone. Defaults to UTC.
streaming_parallelismADAPTIVE/0,1,2,...If STREAMING_PARALLELISM is non-zero, CREATE MATERIALIZED VIEW/TABLE/INDEX will use it as streaming parallelism.
rw_streaming_enable_delta_jointrue/falseEnable delta join for streaming queries. Defaults to false.
rw_streaming_enable_bushy_jointrue/falseEnable bushy join for streaming queries. Defaults to true.
streaming_use_arrangement_backfilltrue/falseEnable arrangement backfill for streaming queries. Defaults to true.
streaming_use_snapshot_backfilltrue/falseEnable snapshot backfill for streaming queries. Defaults to false.
rw_enable_join_orderingtrue/falseEnable join ordering for streaming and batch queries. Defaults to true.
rw_enable_two_phase_aggtrue/falseEnable two phase agg optimization. Defaults to true. Setting this to true will always set FORCE_TWO_PHASE_AGG to false.
rw_force_two_phase_aggtrue/falseForce two phase agg optimization whenever there's a choice between optimizations. Defaults to false. Setting this to true will always set ENABLE_TWO_PHASE_AGG to false.
rw_enable_share_plantrue/falseEnable sharing of common sub-plans. This means that DAG structured query plans can be constructed, rather than only tree structured query plans.
rw_force_split_distinct_aggtrue/falseEnable split distinct agg.
intervalstylepostgresSet the display format for interval values. It is typically set by an application upon connection to the server. See here for details.
batch_parallelism0If BATCH_PARALLELISM is non-zero, batch queries will use this parallelism.
server_version9.5.0The version of PostgreSQL that Risingwave claims to be.
server_version_num90500The version of PostgreSQL that Risingwave claims to be.
client_min_messagesnoticeSee here for details.
client_encodingUTF8See here for details.
sink_decoupledefaultEnable decoupling sink and internal streaming graph or not.
synchronize_seqscanstrue/falseSee here for details. Unused in RisingWave, support for compatibility.
statement_timeout3600Abort query statement that takes more than the specified amount of time in sec. If log_min_error_statement is set to ERROR or lower, the statement that timed out will also be logged. The default value is 1 hour.
lock_timeout0See here for details. Unused in RisingWave, support for compatibility.
cdc_source_wait_streaming_start_timeout30For limiting the startup time of a shareable CDC streaming source when the source is being created. Unit: seconds.
row_securitytrue/falseSee here for details. Unused in RisingWave, support for compatibility.
standard_conforming_stringsonSee here for details.
source_rate_limitdefault/ A positive integer / 0Set the maximum number of records per second per source, for each parallelism. The source here refers to an upstream source. This parameter is applied to tables and tables with sources.

The value can be default, 0, or a positive integer. SET SOURCE_RATE_LIMIT TO 0 will pause the source read for sources. SET SOURCE_RATE_LIMIT TO DEFAULT will disable the rate limit within the session, but it will not change the rate limits of existing DDLs.

Note that the total throughput of a streaming job is determined by multiplying the parallelism with the throttle rate. To obtain the parallelism value for a streaming job, you can refer to the streaming_parallelism runtime parameter in this table.

Additionally, we support altering rate limits in sources and tables that have source.
backfill_rate_limitdefault/ A positive integer / 0Set the maximum number of records per second per parallelism for the backfill process of materialized views, sinks, and indexes. This parameter throttles the snapshot read stream for backfill.

The value can be default, 0, or a positive integer. SET BACKFILL_RATE_LIMIT TO 0 will pause the snapshot read stream for backfill. SET BACKFILL_RATE_LIMIT TO default will disable the backfill rate limit within the session, but it will not change the backfill rate limit of existing DDLs. To obtain the parallelism value for a streaming job, you can refer to the streaming_parallelism runtime parameter in this table.

Additionally, we support altering backfill rate limits in materialized views and CDC tables.
rw_streaming_over_window_cache_policyfullCache policy for partition cache in streaming over window. Can be "full", "recent", "recent_first_n" or "recent_last_n".
background_ddltrue/falseRun DDL statements in background.
server_encodingUTF8Show the server-side character set encoding. At present, this parameter can be shown but not set, because the encoding is determined at database creation time.
bytea_outputhexSet the output format for values of type bytea. Valid values are hex (the default) and escape (the traditional PostgreSQL format). See Section 8.4 for more information. The bytea type always accepts both formats on input, regardless of this setting.

If you just want to view a specific parameter's value, you can also use the SHOW command.

SHOW parameter_name;

How to configure runtime parameters?

You can use SET command or the set_config() function to change the setting of a runtime parameter.

The syntax of the SET command is:

SET parameter_name { TO | = } { value | 'value' | DEFAULT};

Where parameter_name is the name of the parameter, and value or 'value' is the new value of the parameter. DEFAULT can be written to specify resetting the parameter to its default value.

For details about the set_config() function, see System administration functions, and for details about the SET command, see SET.

You can also use the ALTER SYSTEM SET command to set a system-wide default value for a runtime parameter. This configuration will then be applied to every new session.

Syntax
ALTER SYSTEM SET session_param_name TO session_param_value;

Help us make this doc better!