-
Notifications
You must be signed in to change notification settings - Fork 435
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
Index limitations with the annotation
and document_uri
tables
#8498
Comments
ix__document_uri_uri_normalizedThe original issue what not about this index but about the unique one that combined a few columns. For that the fix was to use md5 in the index That also fixed the relatively common exception about the unique index in production because the combination of a claimant + uri + type + content_type is more likely to go over the limit than just uri. After that we are still getting an issue creating the index on document_uri while restoring because some values are very large there. This index is created with:
which currently fails with:
we can find the longest URIs with this query To fix this we need to:
|
ix__annotation_tagsThis index also fails to be created due to rows with tags that are to long. For tags we already do validation of the length at the API level We have to fix the existing tags in the DB. We removed the longest tags in the DB to leave the DB in a state where the index can be created again: https://hypothes-is.slack.com/archives/C4K6M7P5E/p1707842794675309 Sample query to remove the queries:
This should work on the next restore. |
I can confirm database restores now complete without error. Thanks for the work on this. |
Description
Whilst restoring a recent backup of the production
h
database a number of errors relating to index limitations on theannotation
anddocument_uri
tables were encountered. Due to this the indexes on the restored tables do not match production.References
The text was updated successfully, but these errors were encountered: