Repository navigation
feat(core): load imported COPY rows through copy-in on a fixed tokio-postgres - #4258
Merged
Merged
Conversation
datlechin
enabled auto-merge (squash)
November 13, 2026 01:33
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
COPY ... FROM stdinblock through the newEditorSession::copy_in, piece by piece as the file is read, in the import's transaction or one of the driver's own. Text and CSV load with any option. Binary is refused and its rows skipped. ADR 0024; ADR 0011's INSERT path is superseded.TableProApp/rust-postgres(the 0.7.18 tag plus fix(tokio): flush instead of sync when copy_in starts rust-postgres/rust-postgres#1402, Flush in place of that first Sync) through[patch.crates-io].deny.tomlallows that git source. The license files do not change.cargo vendorwrites for those git crates, which%cargo_prepleaves out; the Debian and Flatpak builds already copy it.START TRANSACTION READ ONLY, and the server refuses it with 25006.;, runs what follows the COPY on that line once the rows end, as psql does, and waits for the rest of a long COPY line before it reads rows.pg_dump_copy_rows_become_inserts_and_restrict_lines_are_passed_over(now..._follow_their_copy_...),a_copy_with_options_is_refused_and_its_rows_skipped(nowa_csv_copy_with_options_passes_its_rows_as_written), and the removeda_text_format_line_becomes_literals,octal_and_hex_escapes_read_as_bytes,an_empty_field_is_an_empty_string.linux/README.mdis its home.Test plan
tablepro-driver-postgres:copy_in::*(11),pgbouncer::transaction_pool_copy_*(2),dump::suite::native_dump_loads_through_the_import,csv_import::*. The five refused or stopped COPY tests fail on unpatched 0.7.18 and pass here.sql_import_copy_in::a_copy_refused_after_its_end_was_queued_keeps_the_statement_after_itfails on the first version of the import loop;a_copy_on_a_long_line_waits_for_the_rest_of_its_lineandthe_statements_read_whole_before_the_file_stops_being_readable_runfail without their fixes.cargo testfor tablepro-core, tablepro-test-support, tablepro-driver-postgres and tablepro-session; clippy with-D warnings;cargo deny check bans licenses sources;update-third-party-licenses.shwrites no change.copy_in_statement_errorandcopy_in_not_a_copyfail on 0.7.18; all three new tests and the crate suite pass with the fix.