-
Notifications
You must be signed in to change notification settings - Fork 235
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
Migration error: #1047
Comments
More detail -- the issue is caused by thousands of lines of comments inserted into the If I remove the thousands of lines of comments the migration can run. I'm not sure why |
This bug also extends to seed.sql in cases where a row has a very long JSON value. If you've got a value that's above whatever the limit is it fails with the same |
I've opened a PR to address the documentation issue for The comments in pg_dump are indeed unnecessary. They will be removed by default starting from the next minor release. If anyone would like to keep them, they may pass in |
@sweatybridge It seems fairly easy to trigger this problem, is there a reason not to make the default size larger? Even if it's documented it will still likely confuse a lot of people. |
I'd imagine the right default size depends on the use case. The last time we increased to 256KB was to handle storing of geographical data. Perhaps a nicer way to handle this error is to programmatically double the buffer size and retry up to a certain upper bound. Once the upper bound is determined, users can save the env var under |
I've updated default max buffer size to be the length of migration file. This should handle most common use cases. |
Thank you yet again for delivering a great quick fix! |
Bug report
Describe the bug
When attempting to
supabase db reset
my migration to set up my initial schema (generated withsupabase db dump
) fails withPotenitally related issue (and PR illustrating fix) here: influxdata/influxdb#19586 influxdata/influxdb#19662
It seems that there's a default configuration in whatever golang library that's being used where it errors if a single line is greater than 64kb? I'm not really familiar with go but it seems this might be an easy fix.
To Reproduce
supabase db dump -f supabase/migrations/20230401000000_initial_schema.sql
on a project with a large schemasupabase db reset
to reset local db and apply the schemaobserve failure with
Error: bufio.Scanner: token too long
Expected behavior
Migrations of any size should work, especially those generated with
supabase db dump
Screenshots
N/A
System information
Additional context
The text was updated successfully, but these errors were encountered: