risingwavelabs/risingwave · error
missing `slot.name` in CDC properties
Error message
missing `slot.name` in CDC properties
What it means
CdcSplitEnumerator::query_postgres_lsns connects to the upstream PostgreSQL to read slot LSNs (used to monitor confirmed_flush_lsn for progress). It requires the CDC properties to contain `slot.name`; without it, the slot to query is unknown and this error is thrown.
Source
Thrown at src/connector/src/source/cdc/enumerator/mod.rs:244
}
None => {
tracing::warn!(
"no replication slot was found while querying LSNs for source {}",
self.source_id
);
}
};
Ok(())
}
/// Query LSNs from PostgreSQL, return (`confirmed_flush_lsn`, `upstream_max_lsn`, `slot_name`).
async fn query_postgres_lsns(&self) -> ConnectorResult<Option<(Option<u64>, u64, String)>> {
let pg_conn = pg_connection_config_from_properties(&self.properties)?;
let slot_name = self
.properties
.get("slot.name")
.ok_or_else(|| anyhow::anyhow!("missing `slot.name` in CDC properties"))?;
// No TCP keepalive for CDC enumerator
let application_name = format!("risingwave-postgres-source-enumerator-{}", self.source_id);
let client = create_pg_client(&pg_conn, None, Some(&application_name))
.await
.context("failed to create the PostgreSQL client")?;
let query = "SELECT confirmed_flush_lsn, pg_current_wal_lsn() \
FROM pg_replication_slots WHERE slot_name = $1";
let row = client
.query_opt(query, &[&slot_name])
.await
.context("failed to query PostgreSQL LSNs")?;
match row {
Some(row) => {
let confirmed_flush_lsn: Option<PgLsn> = row.get(0);
let upstream_max_lsn: PgLsn = row.get(1);
Ok(Some((View on GitHub (pinned to 6469eb736d)
Solutions
- Add slot.name='<slot>' to the CDC source WITH clause (or recreate the source with it)
- Check for misspellings such as slotname / slot_name — the key must be exactly 'slot.name'
- Drop and recreate the source if persisted metadata is missing the key
Example fix
// before WITH (connector='cdc', hostname='pg', database='mydb', ...) // after WITH (connector='cdc', hostname='pg', database='mydb', slot.name='rw_slot_1', ...)
Defensive patterns
Strategy: validation
Validate before calling
if !cdc_props.contains_key("slot.name") {
return Err(anyhow!("CDC properties require slot.name, e.g. slot.name='rw_slot_1'"));
} Prevention
- Always set slot.name when creating Postgres CDC sources
- Use the exact key spelling 'slot.name' (dot, not underscore)
- Validate CDC property keys against the documented schema before creation
When it happens
Trigger: Calling query_postgres_lsns (via monitor_postgres_confirmed_flush_lsn) on a Postgres CDC source whose properties map lacks the 'slot.name' key — e.g. the source was created without slot.name or with a misspelled key like slotname.
Common situations: Postgres CDC source created without slot.name option; renaming option keys between versions; manually constructed properties maps.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- PostgreSQL table {} exists, but the connection user `{}` doe
- Postgres table should define the primary key for non-append-
- {:?} data type is not supported
- unsupported encoding for DEBEZIUM_MONGO format
- unsupported encoding for Maxwell
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/e9e2f3a104789236.
Report an issue: GitHub.