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

Database migration failed (bleeding 07/03/2021) #5606

Closed
tomkolp opened this issue Mar 7, 2021 · 1 comment
Closed

Database migration failed (bleeding 07/03/2021) #5606

tomkolp opened this issue Mar 7, 2021 · 1 comment
Assignees
Labels
bug Something is broken.
Milestone

Comments

@tomkolp
Copy link
Contributor

tomkolp commented Mar 7, 2021

weblate_1           | Operations to perform:
weblate_1           |   Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, weblate_auth, wladmin
weblate_1           | Running migrations:
database_1          | 2021-03-07 10:26:43.475 UTC [62] ERROR:  index row size 4152 exceeds btree version 4 maximum 2704 for index "memory_lookup_index"
database_1          | 2021-03-07 10:26:43.475 UTC [62] DETAIL:  Index row references tuple (2116,7) in relation "memory_memory".
database_1          | 2021-03-07 10:26:43.475 UTC [62] HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
database_1          |   Consider a function index of an MD5 hash of the value, or use full text indexing.
database_1          | 2021-03-07 10:26:43.475 UTC [62] STATEMENT:  CREATE INDEX memory_lookup_index ON memory_memory (source, target, origin)
weblate_1           |   Applying memory.0009_pg_index...[2021-03-07 11:26:43,569: WARNING/62] Handled exception: OperationalError: index row size 4152 exceeds btree version 4 maximum 2704 for index "memory_lookup_index"
weblate_1           | DETAIL:  Index row references tuple (2116,7) in relation "memory_memory".
weblate_1           | HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
weblate_1           | Consider a function index of an MD5 hash of the value, or use full text indexing.
weblate_1           |
weblate_1           | Traceback (most recent call last):
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/backends/utils.py", line 84, in _execute
weblate_1           |     return self.cursor.execute(sql, params)
weblate_1           | psycopg2.errors.ProgramLimitExceeded: index row size 4152 exceeds btree version 4 maximum 2704 for index "memory_lookup_index"
weblate_1           | DETAIL:  Index row references tuple (2116,7) in relation "memory_memory".
weblate_1           | HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
weblate_1           | Consider a function index of an MD5 hash of the value, or use full text indexing.
weblate_1           |
weblate_1           |
weblate_1           | The above exception was the direct cause of the following exception:
weblate_1           |
weblate_1           | Traceback (most recent call last):
weblate_1           |   File "/usr/local/bin/weblate", line 8, in <module>
weblate_1           |     sys.exit(main())
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/weblate/runner.py", line 34, in main
weblate_1           |     utility.execute()
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 395, in execute
weblate_1           |     self.fetch_command(subcommand).run_from_argv(self.argv)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/core/management/base.py", line 330, in run_from_argv
weblate_1           |     self.execute(*args, **cmd_options)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/core/management/base.py", line 371, in execute
weblate_1           |     output = self.handle(*args, **options)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/core/management/base.py", line 85, in wrapped
weblate_1           |     res = handle_func(*args, **kwargs)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/core/management/commands/migrate.py", line 245, in handle
weblate_1           |     fake_initial=fake_initial,
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/migrations/executor.py", line 117, in migrate
weblate_1           |     state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
weblate_1           |     state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/migrations/executor.py", line 227, in apply_migration
weblate_1           |     state = migration.apply(state, schema_editor)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/migrations/migration.py", line 124, in apply
weblate_1           |     operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
weblate_1           |     self.code(from_state.apps, schema_editor)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/weblate/memory/migrations/0009_pg_index.py", line 13, in create_index
weblate_1           |     "CREATE INDEX memory_lookup_index ON memory_memory (source, target, origin)"
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/backends/base/schema.py", line 142, in execute
weblate_1           |     cursor.execute(sql, params)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/sentry_sdk/integrations/django/__init__.py", line 499, in execute
weblate_1           |     return real_execute(self, sql, params)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/backends/utils.py", line 66, in execute
weblate_1           |     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
weblate_1           |     return executor(sql, params, many, context)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/backends/utils.py", line 84, in _execute
weblate_1           |     return self.cursor.execute(sql, params)
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/utils.py", line 90, in __exit__
weblate_1           |     raise dj_exc_value.with_traceback(traceback) from exc_value
weblate_1           |   File "/usr/local/lib/python3.7/dist-packages/django/db/backends/utils.py", line 84, in _execute
weblate_1           |     return self.cursor.execute(sql, params)
weblate_1           | django.db.utils.OperationalError: index row size 4152 exceeds btree version 4 maximum 2704 for index "memory_lookup_index"
weblate_1           | DETAIL:  Index row references tuple (2116,7) in relation "memory_memory".
weblate_1           | HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
weblate_1           | Consider a function index of an MD5 hash of the value, or use full text indexing.
weblate_1           |
weblate_1           | Sentry is attempting to send 1 pending error messages
weblate_1           | Waiting up to 2 seconds
weblate_1           | Press Ctrl-C to quit
@tomkolp tomkolp changed the title Database migration failed (bleeding 03/07/2021) Database migration failed (bleeding 07/03/2021) Mar 7, 2021
@nijel nijel self-assigned this Mar 7, 2021
@nijel nijel added the bug Something is broken. label Mar 7, 2021
@nijel nijel added this to the 4.5.2 milestone Mar 7, 2021
@nijel nijel closed this as completed in b2ded9b Mar 7, 2021
nijel added a commit that referenced this issue Mar 7, 2021
- Add huge translation memory entry (issue #5606)
- Fixed creating glossaries for migration
@github-actions
Copy link

github-actions bot commented Mar 7, 2021

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants