Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-7351 Avoid child data snapshots from PostgreSQL parent tables #5159

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

koleo
Copy link

@koleo koleo commented Jan 15, 2024

When PostgreSQL tables are configured with inheritance (INHERIT clause), data is streamed by Debezium from the table where the data resides (usually the child tables).

However, during the initial/incremental snapshot, Debezium selects all data from the parent tables, including child data, which pushes unexpected/duplicate data into the topics (all data from child tables).

Using a "SELECT ... FROM ONLY" retrieves only data from the current table and avoids retrieving data from child tables.

Copy link

Welcome as a new contributor to Debezium, @koleo. Reviewers, please add missing author name(s) and alias name(s) to the COPYRIGHT.txt and Aliases.txt respectively.

When PostgreSQL tables are configured with inheritance (INHERIT clause),
data is streamed by Debezium from the table where the data resides
(usually the child tables).

However, during the initial/incremental snapshot, Debezium selects all
data from the parent tables, including child data, which pushes
unexpected/duplicate data into the topics (all data from child tables).

Using a "SELECT ... FROM ONLY" retrieves only data from the current
table and avoids retrieving data from child tables.

Signed-off-by: Nicolas Payart <npayart@gmail.com>
@jpechane
Copy link
Contributor

jpechane commented Jan 16, 2024

@koleo Please try to run RecordsSnapshotParallelProducerIT and RecordsSnapshotProducerIT with Postgres 14 (you can use postgres-14 profile. There are some failures that needs to be addressed. Thanks!

@koleo
Copy link
Author

koleo commented Jan 16, 2024

Yes I will 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants