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. They are also known as session variables.
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.
For example, you may see a table similar to this:
Below is the detailed information about the parameters you may see after using the SHOW ALL
command:
Name | Values or examples | Description |
---|---|---|
rw_implicit_flush | true/false | If 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_mv | true/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. The default value is auto which means let the system decide to run batch queries in local or distributed mode automatically. |
extra_float_digits | 1 | Set the number of digits displayed for floating-point values. See here for details. |
application_name | psql | Set the application name to be reported in statistics and logs. See here for details. |
datestyle | DMY | It is typically set by an application upon connection to the server. See here for details. |
rw_batch_enable_lookup_join | true/false | Force the use of lookup join instead of hash join when possible for local batch execution. |
rw_batch_enable_sort_agg | true/false | Enable usage of sortAgg instead of hash agg when order property is satisfied in batch execution. |
batch_enable_distributed_dml | true/false | Enable 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_gap | 8 | The max gap allowed to transform small range scan into multi point lookup. |
search_path | ”$user”, public | Set 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_mode | default | If VISIBILITY_MODE is all , we will support querying the latest uncommitted data, and consistency is not guaranteed between the tables. |
transaction_isolation | read committed | See here for details. |
query_epoch | 0 | Select as of specific epoch. Sets the historical epoch for querying data. If 0, querying latest data. |
timezone | UTC | Session timezone. Defaults to UTC. |
streaming_parallelism | ADAPTIVE/0,1,2,… | If STREAMING_PARALLELISM is non-zero, CREATE MATERIALIZED VIEW/TABLE/INDEX will use it as streaming parallelism. |
rw_streaming_enable_delta_join | true/false | Enable delta join for streaming queries. Defaults to false. |
rw_streaming_enable_bushy_join | true/false | Enable bushy join for streaming queries. Defaults to true. |
streaming_use_arrangement_backfill | true/false | Enable arrangement backfill for streaming queries. Defaults to true. |
streaming_use_snapshot_backfill | true/false | Enable snapshot backfill for streaming queries. Defaults to false. |
rw_enable_join_ordering | true/false | Enable join ordering for streaming and batch queries. Defaults to true. |
rw_enable_two_phase_agg | true/false | Enable two phase agg optimization. Defaults to true. Setting this to true will always set FORCE_TWO_PHASE_AGG to false. |
rw_force_two_phase_agg | true/false | Force 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_plan | true/false | Enable 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_agg | true/false | Enable split distinct agg. |
intervalstyle | postgres | Set the display format for interval values. It is typically set by an application upon connection to the server. See here for details. |
batch_parallelism | 0 | If BATCH_PARALLELISM is non-zero, batch queries will use this parallelism. |
server_version | 9.5.0 | The version of PostgreSQL that Risingwave claims to be. |
server_version_num | 90500 | The version of PostgreSQL that Risingwave claims to be. |
client_min_messages | notice | See here for details. |
client_encoding | UTF8 | See here for details. |
sink_decouple | default | Enable decoupling sink and internal streaming graph or not. |
synchronize_seqscans | true/false | See here for details. Unused in RisingWave, support for compatibility. |
statement_timeout | 3600 | Abort 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_timeout | 0 | See here for details. Unused in RisingWave, support for compatibility. |
cdc_source_wait_streaming_start_timeout | 30 | For limiting the startup time of a shareable CDC streaming source when the source is being created. Unit: seconds. |
row_security | true/false | See here for details. Unused in RisingWave, support for compatibility. |
standard_conforming_strings | on | See here for details. |
source_rate_limit | default/positive integer/0 | Set the maximum number of records per second per source, for each parallelism. This parameter is applied when creating new sources and tables with sources. The value can be default, 0, or a positive integer.
ALTER to change the rate limits in existing sources and tables that have source. 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. |
backfill_rate_limit | default/positive integer/0 | Set the maximum number of records per second per parallelism for the backfill process of materialized views, sinks, and indexes. This parameter is applied when creating new jobs, and throttles the backfill from upstream materialized views and sources. The value can be default, 0, or a positive integer. SET BACKFILL_RATE_LIMIT TO 0 will pause the backfill. SET BACKFILL_RATE_LIMIT TO default will remove the backfill rate limit. Setting this variable will only affect new DDLs within the session, but not change the rate limits of existing jobs. Use ALTER to change the backfill rate limits in existing materialized views and CDC tables. 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. |
rw_streaming_over_window_cache_policy | full | Cache policy for partition cache in streaming over window. Can be full , recent , recent_first_n or recent_last_n . |
background_ddl | true/false | Run DDL statements in background. |
server_encoding | UTF8 | Show 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_output | hex | Set the output format for values of type bytea. Valid values are hex (the default) and escape (the traditional PostgreSQL format). 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.
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:
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.
SET
applies only to the current session.
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.
ALTER SYSTEM SET
takes effect in new sessions. The value of the runtime parameter remains unchanged in the current session.
Was this page helpful?