Fix --split-tables-larger-than resume guidance#36
Open
teknogeek0 wants to merge 1 commit intomainfrom
Open
Conversation
The blanket "never use with --resume" was wrong. The truncation risk only exists when COPY is still in progress. If COPY completed and the failure was in indexes/CDC, resume with the same value is safe and required by catalog validation.
DmitriiAn
reviewed
Apr 1, 2026
| /usr/lib/postgresql/17/bin/pgcopydb clone \ | ||
| --follow \ | ||
| --plugin wal2json \ | ||
| --resume \ |
Contributor
There was a problem hiding this comment.
the script does not support switching between --resume and --restart flags. according to the README users should be able to do that
DmitriiAn
reviewed
Apr 1, 2026
| This backs up the SQLite catalog before resuming. It uses `--not-consistent` to allow resuming from a mid-transaction state, and intentionally omits `--split-tables-larger-than` because pgcopydb truncates the entire table before checking split parts on resume, which causes data loss. | ||
| This backs up the SQLite catalog before resuming and uses `--not-consistent` to allow resuming from a mid-transaction state. | ||
|
|
||
| **Choosing between `--resume` and `--restart`:** |
Contributor
There was a problem hiding this comment.
as a user, I am not sure where to apply --resume and --restart because it wasn't shown in the examples above
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.
Summary
--split-tables-larger-thanback toresume-migration.sh(matchingrun-migration.sh)--resumewith same value is safe (COPY supervisor doesn't run)--restartinstead (truncation risk for split tables)Test plan