Debezium Postgres Connector中table.include.list配置参数失效问题
First off, this isn't a bug—it's a common misunderstanding with how Debezium handles the table.include.list parameter. Let's break down what's happening and how to fix it so you can split your connectors for config.abc and config.def separately.
Why Both Tables Are Being Synced
Debezium uses regular expressions for the table.include.list (and similar filter parameters), not exact string matches. The problem here likely stems from two possible scenarios:
- You didn't escape the dot in your filter: The
.in regex matches any single character, not a literal schema-table separator. Soconfig.abcas written could accidentally match unintended table names if they share a similar substring. - You might have a conflicting
schema.include.listparameter set toconfig—this would override table-level filters and sync all tables in theconfigschema, which explains why bothabcanddefare being picked up.
The Correct Configuration
To target only the config.abc table in one connector, set table.include.list to:
^config\\.abc$
Let's break this precise regex down:
^anchors the match to the start of the fully qualified table name (prevents matches likeother.config.abc).\\.is an escaped dot, matching the literal separator between schema and table name.abcis the exact table name you want to sync.$anchors the match to the end of the string, ensuring no extra characters afterabcare allowed.
For your separate connector targeting config.def, use:
^config\\.def$
Additional Checks to Ensure Filtering Works
- Remove any conflicting
schema.include.listentries that would include the entireconfigschema. - Verify your Debezium version is up to date (v1.9+ is recommended, as older versions had edge cases with regex filtering).
- Double-check case sensitivity: PostgreSQL schema/table names are case-sensitive if created with quotes. If your schema is actually
Config(capitalized), adjust the regex to match that exact case.
Once you update the configs, each connector will only sync the specific table you've targeted, letting you split the load and improve sync efficiency as you wanted.
内容的提问来源于stack exchange,提问作者abhinav kumar




