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

inserttable() fails with wide rows #69

Closed
justinpryzby opened this issue Feb 10, 2022 · 1 comment
Closed

inserttable() fails with wide rows #69

justinpryzby opened this issue Feb 10, 2022 · 1 comment

Comments

@justinpryzby
Copy link

justinpryzby commented Feb 10, 2022

It's using a fixed-sized 8k buffer, and raises MemoryError for a longer row.

I think the column list should also be dynamically allocated.

This isn't theoretical - we have tables with (historically) up to 1600 columns, and just failed inserting a row with an 7800 byte column into a narrow table. I still wonder whether inserttable should be re-written in python. I mailed talking about this this some time ago.

@Cito
Copy link
Member

Cito commented Feb 10, 2022

Yes, maybe that would not be such a big perfomance loss. But we should definitely verify this with benchmarks and such huge numbers of columns and rows before we replace it.

As a quick remedy, we could increase the buffer size. Since it is taken from the heap, I think we could safely set it to 64k.

I noticed that MAX_BUFFER_SIZE is only used one other time in getline(), where the buffer is put on the stack.

@justinpryzby justinpryzby changed the title inserttable() fails with long rows inserttable() fails with wide rows Mar 22, 2022
@Cito Cito closed this as completed Mar 26, 2022
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

No branches or pull requests

2 participants