Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
postgres-source: complete implementation for for ctid and xmin sync #27302
postgres-source: complete implementation for for ctid and xmin sync #27302
Changes from 36 commits
194a62c
ec7198c
1459acb
8681c8c
14371ea
a4ecc7e
eb7255c
69e6989
a796a81
2215f64
52d09a0
c6bebb5
286c5cd
7950be8
7ef08e3
cba94db
378357a
cb5bd39
0689f30
7ea3fdf
3ab062c
f7e9939
06f3ea7
643aff7
0756579
134637c
1f67fac
1e57a69
f7dddd8
06dcae4
854b414
65f4711
63a14f7
52eb61d
27fb1a2
f0a1dc4
97aa8ff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never actually get here in case a full vacuum is running.
Since a full vacuum takes an exclusive read on a table as a result it'll block any
SELECT
until vacuum is done.For example:
A call to
getXminStatus()
in PostgresSource.java#246 will blockThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm! Am not sure I understand. The XMIN query doesnt query any specific table. It queries the xmin value from the database. If a table is going under vacuum how would it stop us from getting the xmin value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave this line as an example
but even queries before and after are hanging if there's a full vacuum going on.
I'd leave our check still just in case, but it is largely a dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: static import
io.airbyte.protocol.models.v0.AirbyteStreamNameNamespacePair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that there is already a static import for the class without the
v0
(import io.airbyte.protocol.models.AirbyteStreamNameNamespacePair;
) so it wont let me static import thisThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit : More of an extension of the discussion we had in the AM
Maybe not for this PR, but this is the issue I was talking about : https://github.com/airbytehq/airbyte/issues/27115 where ideally we want to kick off an incremental xmin sync after the initial successful ctid sync.
One way to do this is to slightly augment what you have here. Even for streams that belong to
streamsForCtidSync
we can build iterators for the xmin query and merge them so that the xmin iterator runs after the ctid iterator.When that happens, we'll have to make sure that the handlers can merge streams based on stream name