Postgres source connector with xmin - Data consistency between tables #35942
beratwallee
started this conversation in
Connector Ideas and Features
Replies: 1 comment
-
Hi @akashkulk and @subodh1810. I saw that you worked in this section of the code. What do you think about the question I raised in the previous message? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Airbyte Community,
I was reading the code of the Postgres source connector, and I wanted to know how to guarantee data consistency between the tables involved in a connection.
I see this query:
airbyte/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/xmin/PostgresXminHandler.java
Line 180 in 0f2685b
That is executed for each table at different moments.
When working with related tables, like those with parent-child relationships, dependent data can exist between them. If two separate transactions are in progress while queries are being run, changes made by one transaction may be reflected in one table but not in the other.
What do you think about the following change to ensure data consistency between tables?
I added AND xmin::text::bigint < ? with the value of the current xmin status. I haven’t yet seen what was done after the query executions. Maybe Airbyte cuts the data to guarantee consistency, but I doubt it.
Beta Was this translation helpful? Give feedback.
All reactions