Skip to content

Add --defer-validate-fks to create all FKeys as unvalidated#31

Open
YashoSharma wants to merge 2 commits into
planetscale:mainfrom
YashoSharma:yash/defer-validate-fks
Open

Add --defer-validate-fks to create all FKeys as unvalidated#31
YashoSharma wants to merge 2 commits into
planetscale:mainfrom
YashoSharma:yash/defer-validate-fks

Conversation

@YashoSharma
Copy link
Copy Markdown

Summary

  • If --defer-validate-fks is set it will create all foreign keys on the target database as NOT VALID allowing asynchronous validation manually without fully locking the table
  • This flag doesn't automatically start validating foreign keys during CDC catchup, instead allowing end user control over when they chose to schedule the workload.
  • For workloads with long foreign key addition stages allows CDC to begin with a smaller backlog to work through.

Test plan

  • Added a test directory for this workflow

@YashoSharma YashoSharma force-pushed the yash/defer-validate-fks branch 2 times, most recently from 6c6fd4f to c48fc65 Compare May 7, 2026 04:52
@YashoSharma YashoSharma force-pushed the yash/defer-validate-fks branch from c48fc65 to 5096616 Compare May 7, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant