Expand description
Run-time configuration parameters
§Overview
Materialize roughly follows the PostgreSQL configuration model, which works
as follows. There is a global set of named configuration parameters, like
DateStyle
and client_encoding
. These parameters can be set in several
places: in an on-disk configuration file (in Postgres, named
postgresql.conf), in command line arguments when the server is started, or
at runtime via the ALTER SYSTEM
or SET
statements. Parameters that are
set in a session take precedence over database defaults, which in turn take
precedence over command line arguments, which in turn take precedence over
settings in the on-disk configuration. Note that changing the value of
parameters obeys transaction semantics: if a transaction fails to commit,
any parameters that were changed in that transaction (i.e., via SET
) will
be rolled back to their previous value.
The Materialize configuration hierarchy at the moment is much simpler. Global defaults are hardcoded into the binary, and a select few parameters can be overridden per session. A select few parameters can be overridden on disk.
The set of variables that can be overridden per session and the set of variables that can be overridden on disk are currently disjoint. The infrastructure has been designed with an eye towards merging these two sets and supporting additional layers to the hierarchy, however, should the need arise.
The configuration parameters that exist are driven by compatibility with PostgreSQL drivers that expect them, not because they are particularly important.
§Structure
Thw most meaningful exports from this module are:
-
SessionVars
represent per-session parameters, which each user can access independently of one another, and are accessed viaSET
.The fields of
SessionVars
are either;SessionVar
, which is preferable and simply requires full support of theSessionVar
impl for its embedded value type.ServerVar
for types that do not currently support everything required bySessionVar
, e.g. they are fixed-value parameters.
In the fullness of time, all fields in
SessionVars
should beSessionVar
. -
SystemVars
represent system-wide configuration settings and are accessed viaALTER SYSTEM SET
.All elements of
SystemVars
areSystemVar
.
Some VarDefinition
are also marked as a FeatureFlag
; this is just a
wrapper to make working with a set of VarDefinition
easier, primarily from
within SQL planning, where we might want to check if a feature is enabled
before planning it.
Modules§
- cluster_
scheduling - Configuration for how cluster replicas are scheduled.
- constraints 🔒
- Defines constraints that can be imposed on variables.
- definitions 🔒
- errors 🔒
- grpc_
client - Configuration for gRPC client connections.
- polyfill 🔒
- The types in this module exist to overcome limitations of the Rust compiler, namely limitations in const generics.
- upsert_
rocksdb - Tuning for RocksDB used by
UPSERT
sources that takes effect on restart. - value 🔒
Structs§
- Date
Style - This style should actually be some more complex struct, but we only support this configuration of it, so this is fine for the time being.
- Failpoints
- Feature
Flag - flag.
- MzVersion
- Session
Var - A
SessionVar
is the session value for a configuration parameter. If unset, the server default is used instead. - Session
Vars - Session variables.
- System
Var - A
SystemVar
is persisted on disk value for a configuration parameter. If unset, the server default is used instead. - System
Vars - On disk variables.
- VarDefinition
- Definition of a variable.
Enums§
- Client
Encoding - Client
Severity - Severity levels can used to be used to filter which messages get sent to a client.
- EndTransaction
Action - The action to take during end_transaction.
- Interval
Style - Isolation
Level - List of valid isolation levels.
- Network
Policy Error - Owned
VarInput - An owned version of
VarInput
. - Time
Zone - List of valid time zones.
- VarDefault
Value - The kinds of compiled in default values that can be used with
VarDefinition
. - VarError
- Errors that can occur when working with
Var
s - VarInput
- Represents the input to a variable.
- VarParse
Error - Errors that can occur when parsing
VarInput
.
Constants§
- DEFAULT_
DATABASE_ NAME - The name of the default database that Materialize uses.
- IS_
SUPERUSER_ NAME - MZ_
VERSION_ NAME - OLD_
AUTO_ ROUTE_ CATALOG_ QUERIES - OLD_
CATALOG_ SERVER_ CLUSTER - SCHEMA_
ALIAS - SERVER_
MAJOR_ VERSION - The major version of PostgreSQL that Materialize claims to be.
- SERVER_
MINOR_ VERSION - The minor version of PostgreSQL that Materialize claims to be.
- SERVER_
PATCH_ VERSION - The patch version of PostgreSQL that Materialize claims to be.
- TRANSACTION_
ISOLATION_ VAR_ NAME
Statics§
- ALLOWED_
CLUSTER_ REPLICA_ SIZES - ALLOW_
REAL_ TIME_ RECENCY - APPLICATION_
NAME - ARRANGEMENT_
EXERT_ PROPORTIONALITY - AUTO_
ROUTE_ CATALOG_ QUERIES - CLIENT_
ENCODING - CLIENT_
MIN_ MESSAGES - CLUSTER
- CLUSTER_
REPLICA - COORD_
SLOW_ MESSAGE_ WARN_ THRESHOLD - CURRENT_
OBJECT_ MISSING_ WARNINGS - DATABASE
- DATE_
STYLE - DEFAULT_
CLUSTER_ REPLICATION_ FACTOR - DEFAULT_
DATE_ STYLE - DISK_
CLUSTER_ REPLICAS_ DEFAULT - The default for the
DISK
option when creating managed clusters and cluster replicas. - EMIT_
INTROSPECTION_ QUERY_ NOTICE - EMIT_
PLAN_ INSIGHTS_ NOTICE - EMIT_
TIMESTAMP_ NOTICE - EMIT_
TRACE_ ID_ NOTICE - ENABLE_
ALTER_ SET_ CLUSTER - ENABLE_
ALTER_ SWAP - ENABLE_
ALTER_ TABLE_ ADD_ COLUMN - ENABLE_
AWS_ MSK_ IAM_ AUTH - ENABLE_
BINARY_ DATE_ BIN - ENABLE_
CARDINALITY_ ESTIMATES - ENABLE_
CLOCK_ LOAD_ GENERATOR - ENABLE_
CLUSTER_ SCHEDULE_ REFRESH - ENABLE_
COLLECTION_ PARTITION_ BY - ENABLE_
CONNECTION_ VALIDATION_ SYNTAX - ENABLE_
CONSOLIDATE_ AFTER_ UNION_ NEGATE - ENABLE_
CONTINUAL_ TASK_ CREATE - ENABLE_
CONTINUAL_ TASK_ RETAIN - ENABLE_
CONTINUAL_ TASK_ TRANSFORM - ENABLE_
COPY_ FROM_ REMOTE - ENABLE_
COPY_ TO_ EXPR - ENABLE_
CREATE_ TABLE_ FROM_ SOURCE - ENABLE_
DATE_ BIN_ HOPPING - ENABLE_
DEFAULT_ CONNECTION_ VALIDATION - ENABLE_
DEQUADRATIC_ EQPROP_ MAP - ENABLE_
DISK_ CLUSTER_ REPLICAS - ENABLE_
EAGER_ DELTA_ JOINS - ENABLE_
ENVELOPE_ DEBEZIUM_ IN_ SUBSCRIBE - ENABLE_
ENVELOPE_ MATERIALIZE - ENABLE_
ENVELOPE_ UPSERT_ INLINE_ ERRORS - ENABLE_
EXPLAIN_ PUSHDOWN - ENABLE_
EXPRESSIONS_ IN_ LIMIT_ SYNTAX - ENABLE_
INDEX_ OPTIONS - ENABLE_
INTERNAL_ STATEMENT_ LOGGING - ENABLE_
JOIN_ PRIORITIZE_ ARRANGED - ENABLE_
KAFKA_ SINK_ HEADERS - ENABLE_
LAUNCHDARKLY - Boolean flag indicating whether to enable syncing from LaunchDarkly. Can be turned off as an emergency measure to still be able to alter parameters while LD is broken.
- ENABLE_
LESS_ REDUCE_ IN_ EQPROP - ENABLE_
LETREC_ FIXPOINT_ ANALYSIS - ENABLE_
LIST_ LENGTH_ MAX - ENABLE_
LIST_ N_ LAYERS - ENABLE_
LIST_ REMOVE - ENABLE_
LOAD_ GENERATOR_ KEY_ VALUE - ENABLE_
LOGICAL_ COMPACTION_ WINDOW - ENABLE_
MANAGED_ CLUSTER_ AVAILABILITY_ ZONES - ENABLE_
MULTI_ WORKER_ STORAGE_ PERSIST_ SINK - ENABLE_
MZ_ NOTICES - ENABLE_
NETWORK_ POLICIES - ENABLE_
NEW_ OUTER_ JOIN_ LOWERING - ENABLE_
NOTICES_ FOR_ INDEX_ ALREADY_ EXISTS - ENABLE_
NOTICES_ FOR_ INDEX_ EMPTY_ KEY - ENABLE_
NOTICES_ FOR_ INDEX_ TOO_ WIDE_ FOR_ LITERAL_ CONSTRAINTS - ENABLE_
OFF_ THREAD_ OPTIMIZATION - ENABLE_
PERSIST_ STREAMING_ COMPACTION - ENABLE_
PERSIST_ STREAMING_ SNAPSHOT_ AND_ FETCH - ENABLE_
PRIMARY_ KEY_ NOT_ ENFORCED - ENABLE_
PROJECTION_ PUSHDOWN_ AFTER_ RELATION_ CSE - ENABLE_
RAISE_ STATEMENT - ENABLE_
RBAC_ CHECKS - ENABLE_
REDACTED_ TEST_ OPTION - ENABLE_
REDUCE_ MFP_ FUSION - ENABLE_
REDUCE_ REDUCTION - ENABLE_
REFRESH_ EVERY_ MVS - ENABLE_
REPEAT_ ROW - ENABLE_
SESSION_ CARDINALITY_ ESTIMATES - ENABLE_
SESSION_ RBAC_ CHECKS - ENABLE_
SESSION_ TIMELINES - ENABLE_
SQL_ SERVER_ SOURCE - ENABLE_
STORAGE_ SHARD_ FINALIZATION - ENABLE_
TIME_ AT_ TIME_ ZONE - ENABLE_
UNLIMITED_ RETAIN_ HISTORY - ENABLE_
VARIADIC_ LEFT_ JOIN_ LOWERING - ENABLE_
WITHIN_ TIMESTAMP_ ORDER_ BY_ IN_ SUBSCRIBE - ENABLE_
WORKER_ CORE_ AFFINITY - ENABLE_
YUGABYTE_ CONNECTION - ENABLE_
ZERO_ DOWNTIME_ CLUSTER_ RECONFIGURATION - EXTRA_
FLOAT_ DIGITS - FAILPOINTS
- FEATURE_
FLAGS - FORCE_
SOURCE_ TABLE_ SYNTAX - IDLE_
IN_ TRANSACTION_ SESSION_ TIMEOUT - INTEGER_
DATETIMES - INTERVAL_
STYLE - KAFKA_
FETCH_ METADATA_ TIMEOUT - Controls the timeout when fetching kafka metadata. Defaults to 10s.
- KAFKA_
PROGRESS_ RECORD_ FETCH_ TIMEOUT - Controls the timeout when fetching kafka progress records. Defaults to 60s.
- KAFKA_
SOCKET_ CONNECTION_ SETUP_ TIMEOUT - Controls
socket.connection.setup.timeout.ms
for rdkafka client connections. Defaults to the rdkafka default (30000ms). Cannot be greater thani32::MAX
or less than 1000ms - KAFKA_
SOCKET_ KEEPALIVE - Enables
socket.keepalive.enable
for rdkafka client connections. Defaults to true. - KAFKA_
SOCKET_ TIMEOUT - Controls
socket.timeout.ms
for rdkafka client connections. Defaults to the rdkafka default (60000ms). Cannot be greater than 300000ms, more than 100ms greater thankafka_transaction_timeout
, or less than 10ms. - KAFKA_
TRANSACTION_ TIMEOUT - Controls
transaction.timeout.ms
for rdkafka client connections. Defaults to the rdkafka default (60000ms). Cannot be greater thani32::MAX
or less than 1000ms. - KEEP_
N_ PRIVATELINK_ STATUS_ HISTORY_ ENTRIES - Controls
mz_storage_types::parameters::StorageParameters::keep_n_privatelink_status_history_entries
. - KEEP_
N_ SINK_ STATUS_ HISTORY_ ENTRIES - Controls
mz_storage_types::parameters::StorageParameters::keep_n_sink_status_history_entries
. - KEEP_
N_ SOURCE_ STATUS_ HISTORY_ ENTRIES - Controls
mz_storage_types::parameters::StorageParameters::keep_n_source_status_history_entries
. - LOGGING_
FILTER - LOGGING_
FILTER_ DEFAULTS - MAX_
AWS_ PRIVATELINK_ CONNECTIONS - MAX_
CLUSTERS - MAX_
CONNECTIONS - MAX_
CONTINUAL_ TASKS - MAX_
COPY_ FROM_ SIZE - MAX_
CREDIT_ CONSUMPTION_ RATE - MAX_
DATABASES - MAX_
IDENTIFIER_ LENGTH - MAX_
KAFKA_ CONNECTIONS - MAX_
MATERIALIZED_ VIEWS - MAX_
MYSQL_ CONNECTIONS - MAX_
NETWORK_ POLICIES - MAX_
OBJECTS_ PER_ SCHEMA - MAX_
POSTGRES_ CONNECTIONS - MAX_
QUERY_ RESULT_ SIZE - MAX_
REPLICAS_ PER_ CLUSTER - MAX_
RESULT_ SIZE - MAX_
ROLES - MAX_
RULES_ PER_ NETWORK_ POLICY - MAX_
SCHEMAS_ PER_ DATABASE - MAX_
SECRETS - MAX_
SINKS - MAX_
SOURCES - MAX_
SQL_ SERVER_ CONNECTIONS - MAX_
TABLES - MAX_
TIMESTAMP_ INTERVAL - METRICS_
RETENTION - The logical compaction window for builtin tables and sources that have the
retained_metrics_relation
flag set. - MIN_
TIMESTAMP_ INTERVAL - MYSQL_
SOURCE_ CONNECT_ TIMEOUT - Sets the timeout for establishing an authenticated connection to MySQL
- MYSQL_
SOURCE_ SNAPSHOT_ LOCK_ WAIT_ TIMEOUT - Sets the
lock_wait_timeout
value to use during the snapshotting phase of MySQL sources. - MYSQL_
SOURCE_ SNAPSHOT_ MAX_ EXECUTION_ TIME - Sets the
max_execution_time
value to use during the snapshotting phase of MySQL sources. - MYSQL_
SOURCE_ TCP_ KEEPALIVE - Sets the time between TCP keepalive probes when connecting to MySQL via
mz_mysql_util
. - NETWORK_
POLICY - OPENTELEMETRY_
FILTER - OPENTELEMETRY_
FILTER_ DEFAULTS - OPTIMIZER_
E2E_ LATENCY_ WARNING_ THRESHOLD - OPTIMIZER_
ONESHOT_ STATS_ TIMEOUT - OPTIMIZER_
STATS_ TIMEOUT - PERSIST_
FAST_ PATH_ LIMIT - PG_
SOURCE_ CONNECT_ TIMEOUT - Controls the connect_timeout setting when connecting to PG via
mz_postgres_util
. - PG_
SOURCE_ SNAPSHOT_ COLLECT_ STRICT_ COUNT - Please see
PgSourceSnapshotConfig
. - PG_
SOURCE_ SNAPSHOT_ FALLBACK_ TO_ STRICT_ COUNT - Please see
PgSourceSnapshotConfig
. - PG_
SOURCE_ SNAPSHOT_ STATEMENT_ TIMEOUT - Sets the
statement_timeout
value to use during the snapshotting phase of PG sources. - PG_
SOURCE_ SNAPSHOT_ WAIT_ FOR_ COUNT - Please see
PgSourceSnapshotConfig
. - PG_
SOURCE_ TCP_ CONFIGURE_ SERVER - Sets whether to apply the TCP configuration parameters on the server when
connecting to PG via
mz_postgres_util
. - PG_
SOURCE_ TCP_ KEEPALIVES_ IDLE - Sets the amount of idle time before a keepalive packet is sent on the connection when connecting
to PG via
mz_postgres_util
. - PG_
SOURCE_ TCP_ KEEPALIVES_ INTERVAL - Sets the time interval between TCP keepalive probes when connecting to PG via
mz_postgres_util
. - PG_
SOURCE_ TCP_ KEEPALIVES_ RETRIES - Sets the maximum number of TCP keepalive probes that will be sent before dropping a connection
when connecting to PG via
mz_postgres_util
. - PG_
SOURCE_ TCP_ USER_ TIMEOUT - Sets the TCP user timeout when connecting to PG via
mz_postgres_util
. - PG_
SOURCE_ WAL_ SENDER_ TIMEOUT - Sets the
wal_sender_timeout
value to use during the replication phase of PG sources. - PG_
TIMESTAMP_ ORACLE_ CONNECTION_ POOL_ MAX_ SIZE - Controls
mz_adapter::coord::timestamp_oracle::postgres_oracle::DynamicConfig::pg_connection_pool_max_size
. - PG_
TIMESTAMP_ ORACLE_ CONNECTION_ POOL_ MAX_ WAIT - Controls
mz_adapter::coord::timestamp_oracle::postgres_oracle::DynamicConfig::pg_connection_pool_max_wait
. - PG_
TIMESTAMP_ ORACLE_ CONNECTION_ POOL_ TTL - Controls
mz_adapter::coord::timestamp_oracle::postgres_oracle::DynamicConfig::pg_connection_pool_ttl
. - PG_
TIMESTAMP_ ORACLE_ CONNECTION_ POOL_ TTL_ STAGGER - Controls
mz_adapter::coord::timestamp_oracle::postgres_oracle::DynamicConfig::pg_connection_pool_ttl_stagger
. - PRIVATELINK_
STATUS_ UPDATE_ QUOTA_ PER_ MINUTE - REAL_
TIME_ RECENCY - Feature flag indicating whether real time recency is enabled. Not that unlike other feature flags, this is made available at the session level, so is additionally gated by a feature flag.
- REAL_
TIME_ RECENCY_ TIMEOUT - REPLICA_
STATUS_ HISTORY_ RETENTION_ WINDOW - Controls
mz_storage_types::parameters::StorageParameters::replica_status_history_retention_window
. - SEARCH_
PATH - SENTRY_
FILTERS - SERVER_
VERSION - SERVER_
VERSION_ NUM - SESSION_
SYSTEM_ 🔒VARS - Set of
SystemVar
s that can also get set at a per-Session level. - SQL_
SAFE_ UPDATES - SSH_
CHECK_ INTERVAL - Controls the check interval for connections to SSH bastions via
mz_ssh_util
. - SSH_
CONNECT_ TIMEOUT - Controls the connect timeout for connections to SSH bastions via
mz_ssh_util
. - SSH_
KEEPALIVES_ IDLE - Controls the keepalive idle interval for connections to SSH bastions via
mz_ssh_util
. - STANDARD_
CONFORMING_ STRINGS - STATEMENT_
LOGGING_ DEFAULT_ SAMPLE_ RATE - STATEMENT_
LOGGING_ MAX_ DATA_ CREDIT - STATEMENT_
LOGGING_ MAX_ SAMPLE_ RATE - STATEMENT_
LOGGING_ SAMPLE_ RATE - STATEMENT_
LOGGING_ TARGET_ DATA_ RATE - STATEMENT_
LOGGING_ USE_ REPRODUCIBLE_ RNG - STATEMENT_
TIMEOUT - STORAGE_
DATAFLOW_ MAX_ INFLIGHT_ BYTES - The maximum number of in-flight bytes emitted by persist_sources feeding storage
dataflows.
Currently defaults to 256MiB = 268435456 bytes
Note: Backpressure will only be turned on if disk is enabled based on
storage_dataflow_max_inflight_bytes_disk_only
flag - STORAGE_
DATAFLOW_ MAX_ INFLIGHT_ BYTES_ DISK_ ONLY - STORAGE_
DATAFLOW_ MAX_ INFLIGHT_ BYTES_ TO_ CLUSTER_ SIZE_ FRACTION - The fraction of the cluster replica size to be used as the maximum number of in-flight bytes emitted by persist_sources feeding storage dataflows. If not configured, the storage_dataflow_max_inflight_bytes value will be used. For this value to be used storage_dataflow_max_inflight_bytes needs to be set.
- STORAGE_
RECORD_ SOURCE_ SINK_ NAMESPACED_ ERRORS - STORAGE_
SHRINK_ UPSERT_ UNUSED_ BUFFERS_ BY_ RATIO - Configuration ratio to shrink unusef buffers in upsert by. For eg: is 2 is set, then the buffers will be reduced by 2 i.e. halved. Default is 0, which means shrinking is disabled.
- STORAGE_
STATISTICS_ COLLECTION_ INTERVAL - The interval to collect statistics for
mz_source_statistics_per_worker
andmz_sink_statistics_per_worker
in clusterd. Controls the accuracy of metrics. - STORAGE_
STATISTICS_ INTERVAL - The interval to submit statistics to
mz_source_statistics_per_worker
andmz_sink_statistics_per_worker
. - SUPERUSER_
RESERVED_ CONNECTIONS - TIMEZONE
- TRANSACTION_
ISOLATION - UNSAFE_
ENABLE_ TABLE_ CHECK_ CONSTRAINT - UNSAFE_
ENABLE_ TABLE_ FOREIGN_ KEY - UNSAFE_
ENABLE_ TABLE_ KEYS - UNSAFE_
ENABLE_ UNORCHESTRATED_ CLUSTER_ REPLICAS - UNSAFE_
ENABLE_ UNSAFE_ FUNCTIONS - UNSAFE_
ENABLE_ UNSTABLE_ DEPENDENCIES - UNSAFE_
MOCK_ AUDIT_ EVENT_ TIMESTAMP - UNSAFE_
NEW_ TRANSACTION_ WALL_ TIME - USER_
STORAGE_ MANAGED_ COLLECTIONS_ BATCH_ DURATION - WEBHOOKS_
SECRETS_ CACHING_ TTL_ SECS - WEBHOOK_
CONCURRENT_ REQUEST_ LIMIT - WELCOME_
MESSAGE
Traits§
- AsAny
- Helper trait to cast a
&dyn T
to a&dyn Any
. - Value
- Defines a value that get stored as part of a System or Session variable.
- Var
- A
Var
represents a configuration parameter of an arbitrary type.
Functions§
- compat_
translate 🔒 - If the given variable name and/or input is deprecated, return a corresponding updated value, otherwise return the original.
- compat_
translate_ 🔒name - is_
cluster_ scheduling_ var - Returns whether the named variable is a cluster scheduling config
- is_
http_ config_ var - Returns whether the named variable is an HTTP server related config var.
- is_
pg_ timestamp_ oracle_ config_ var - Returns whether the named variable is a Postgres/CRDB timestamp oracle configuration parameter.
- is_
secrets_ caching_ var - Returns whether the named variable is a caching configuration parameter.
- is_
tracing_ var - is_
upsert_ 🔒rocksdb_ config_ var