Conversation
meskill
added this pull request to stack #1694
September 29, 2026 14:23
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
meskill
force-pushed
the
meskill-2026-09-25-feat-resharding---mlr
branch
from
September 29, 2026 15:02
379891f to
953a6da
Compare
meskill
marked this pull request as draft
September 29, 2026 16:42
Base automatically changed from
meskill-2026-09-25-feat-resharding---qwpy
to
main
September 29, 2026 18:30
meskill
force-pushed
the
meskill-2026-09-25-feat-resharding---mlr
branch
from
September 29, 2026 18:30
953a6da to
0189e97
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Integrate the FK key validation into the resharding process. This is done by extending the COPY_DATA task to run the replication until all the tables are synchronized (so the fact that we copy it from different snapshots won't cause issues). After the tables are synchronized we can run the sync_schema with
PostDataValidationto run the actual validation and mark the table as valid.There are different settings to when the run the actual validation, because in theory we can fail at any step during resharding so the constraints will be false because we copy and replicate data with replication role that disables the checks for it. That means even if we ran the validation after COPY_DATA and the pg marked the table as valid during replication we can break the rules and pg won't know about it (although, this should not happen the way we do the replication, and I can think only of the case where the related rows in tables hit different shards so they appeared on different instances).
So, the flow is following: