Skip to content

fix(Postgres) chunk pg_copy data#3703

Merged
abonander merged 2 commits into
transact-rs:mainfrom
joeydewaal:pg-copy
Jan 25, 2025
Merged

fix(Postgres) chunk pg_copy data#3703
abonander merged 2 commits into
transact-rs:mainfrom
joeydewaal:pg-copy

Conversation

@joeydewaal
Copy link
Copy Markdown
Contributor

Sends the data of PgCopyIn in chunks of ((1 GiB - 1) - 1) - 4.

As for #3701, it looks like the data length will only be 8192 or smaller because that's the capacity of the Vec<u8> in WriteBuffer so no need to change anything there.

Fixes #3696

Comment thread sqlx-postgres/src/copy.rs Outdated
Comment thread tests/postgres/postgres.rs Outdated
Comment thread sqlx-postgres/src/copy.rs
@abonander abonander merged commit 6fa0458 into transact-rs:main Jan 25, 2025
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.

PostgreSQL: Handle large messages in PgCopyIn::send or document limits

2 participants