Repository navigation
Fix COPY FROM when ON_ERROR ignore and REJECT_LIMIT are present - #10856
Merged
Merged
Conversation
|
@kpan2034, @natalya-aksman: please review this pull request.
|
Member
Author
|
This code is basically lifted from Postgres with minimal adjustments. |
Codecov Reportβ Patch coverage is
π’ Thoughts on this report? Let us know! |
RobAtticus
force-pushed
the
rrk/copy-on-error-ignore
branch
from
October 20, 2026 15:45
b750f91 to
1947431
Compare
Member
Author
|
Fuzzer failure is known: #10439 (comment) |
RobAtticus
force-pushed
the
rrk/copy-on-error-ignore
branch
from
October 22, 2026 13:33
1947431 to
5bb1aaa
Compare
akuzm
approved these changes
Oct 26, 2026
Poroma-Banerjee
approved these changes
Oct 28, 2026
In PG17, COPY statements added support for `ON_ERROR ignore` which would skip rows where an error occurred. The intercepted version here did not handle this syntax and instead added bogus values for both the row where an error occurred and those afterwards. In PG18, COPY statements added support for `REJECT_LIMIT` which would rollback a COPY if a certain number of errors occurred. The intercepted version here did not handle this either and instead continued inserting (incorrect) rows and did not rollback.
RobAtticus
force-pushed
the
rrk/copy-on-error-ignore
branch
from
October 28, 2026 14:38
5bb1aaa to
93af22c
Compare
RobAtticus
enabled auto-merge (rebase)
October 28, 2026 16:14
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.
In PG17, COPY statements added support for
ON_ERROR ignorewhich would skip rows where an error occurred. The intercepted version here did not handle this syntax and instead added bogus values for both the row where an error occurred and those afterwards.In PG18, COPY statements added support for
REJECT_LIMITwhich would rollback a COPY if a certain number of errors occurred. The intercepted version here did not handle this either and instead continued inserting (incorrect) rows and did not rollback.Closes #10854 and #10855