{"record":{"id":"94ff90622d69aec7","repo":"risingwavelabs/risingwave","slug":"invalid-value-value-for-entry","errorCode":null,"errorMessage":"Invalid value `{value}` for `{entry}`","messagePattern":"Invalid value `(.+?)` for `(.+?)`","errorType":"validation","errorClass":"SessionConfigError","httpStatus":null,"severity":"error","filePath":"src/common/src/session_config/mod.rs","lineNumber":54,"sourceCode":"pub use statement_timeout::StatementTimeout;\nuse thiserror::Error;\n\nuse self::non_zero64::ConfigNonZeroU64;\nuse crate::config::mutate::TomlTableMutateExt;\nuse crate::config::streaming::{CacheRefillPolicy, JoinEncodingType, OverWindowCachePolicy};\nuse crate::config::{ConfigMergeError, StreamingConfig, merge_streaming_config_section};\nuse crate::hash::VirtualNode;\nuse crate::session_config::parallelism::{ConfigBackfillParallelism, ConfigParallelism};\nuse crate::session_config::sink_decouple::SinkDecouple;\nuse crate::session_config::transaction_isolation_level::IsolationLevel;\npub use crate::session_config::visibility_mode::VisibilityMode;\nuse crate::{PG_VERSION, SERVER_ENCODING, SERVER_VERSION_NUM, STANDARD_CONFORMING_STRINGS};\n\npub const SESSION_CONFIG_LIST_SEP: &str = \", \";\n\n#[derive(Error, Debug)]\npub enum SessionConfigError {\n    #[error(\"Invalid value `{value}` for `{entry}`\")]\n    InvalidValue {\n        entry: &'static str,\n        value: String,\n        source: anyhow::Error,\n    },\n\n    #[error(\"Unrecognized config entry `{0}`\")]\n    UnrecognizedEntry(String),\n}\n\ntype SessionConfigResult<T> = std::result::Result<T, SessionConfigError>;\n\nconst AUTO_LOCALITY_BACKFILL_MIN_SIZE: u64 = 10 * 1024 * 1024 * 1024;\n\nfn default_auto_locality_backfill_min_size() -> u64 {\n    AUTO_LOCALITY_BACKFILL_MIN_SIZE\n}\n","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/session_config/mod.rs#L36-L72","documentation":"`SessionConfigError::InvalidValue` is raised when a value assigned to a session config entry (a Postgres-style GUC such as `search_path` or `server_encoding`) fails that entry's value validation; the source field keeps the underlying parse/validation error.","triggerScenarios":"Executing `SET <entry> = <value>` (or `set_config`) in a RisingWave session where the entry name is known but the value fails validation — e.g. `SET TIME ZONE 'bogus'` or an invalid value for `search_path`/`standard_conforming_strings`.","commonSituations":"Typo'd or invalid GUC values in psql sessions; application connection strings setting invalid session variables; scripts ported from Postgres using values RisingWave's stricter validator rejects.","solutions":["Check the valid value set for the specific entry and re-issue SET with a correct value.","Read the `source` field of the error for the underlying validation failure detail.","If the setting is Postgres-only and not implemented, avoid setting it or use a supported alternative.","For applications, wrap SET commands with error handling and fall back to defaults."],"exampleFix":"-- before\nSET timezone TO 'invalid-zone';\n-- after\nSET timezone TO 'UTC';","handlingStrategy":"try-catch","validationCode":"-- validate value against entry's allowed set before SET\ndef valid_value(entry, value) { return KNOWN_GUC_VALUES[entry].contains(value); }","typeGuard":null,"tryCatchPattern":"match session.set_config(entry, value) {\n    Err(SessionConfigError::InvalidValue { entry, source, .. }) =>\n        eprintln!(\"bad value for {entry}: {source}\"),\n    Err(e) => return Err(e.into()),\n    Ok(_) => {}\n}","preventionTips":["Consult the docs for each GUC's accepted values before SET","Validate settings in application code before issuing SET","Read the error's source field to learn the exact validation failure"],"tags":["rust","session-config","guc","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}