Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Postgres) chunk pg_copy data #3703

Merged
merged 2 commits into from
Jan 25, 2025
Merged

Conversation

joeydewaal
Copy link
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

sqlx-postgres/src/copy.rs Outdated Show resolved Hide resolved
tests/postgres/postgres.rs Outdated Show resolved Hide resolved
sqlx-postgres/src/copy.rs Show resolved Hide resolved
@abonander abonander merged commit 6fa0458 into launchbadge:main Jan 25, 2025
81 checks passed
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