-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix(postgres-cdc): only prepare statement in the backfill process #17813
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Self::filter_expression(&primary_keys), | ||
order_key, | ||
); | ||
client.prepare(&scan_sql).await? |
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.
Every time it prepares once and execute once? Then let's just use simple statements such as Line 406~413
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.
prepare for each scan_limit
chunk, we need the data type from upstream to convert varchar
for uuid
.
line 398.
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.
Can we make it prepare once but only when backfill not finished yet?
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.
It is possible, but needs to refactor the code for example to call a init
method before doing the snapshot.
We have set the default value of scan_limit
to 1000, the overhead is low.
…7813) (#17827) Co-authored-by: StrikeW <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.