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

[BUG] - Recipes with long instructions on Postgres break backups #3181

Open
6 tasks done
michael-genson opened this issue Feb 16, 2024 · 0 comments
Open
6 tasks done
Labels
bug: confirmed bug Something isn't working

Comments

@michael-genson
Copy link
Collaborator

michael-genson commented Feb 16, 2024

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

The max size for an index in Postgres is 2704 bytes or so, and instructions can be longer than that. Since we index instructions, this can lead to broken databases (and/or broken backup restores). This can be solved one of two ways:

  1. Remove the recipe instruction index and remove recipe instructions from the recipe search
  2. Create a normalized instructions field that also caps the instructions size, and index/search that instead

Number 1 is probably the right choice, but if there's a compelling reason to include recipe instructions when searching, number 2 is an alternative.

Steps to Reproduce

  1. Create a long recipe instruction (3,000 characters or so)
  2. Create a backup
  3. Restore from that backup (on Postgres)

Please provide relevant logs

(psycopg2.errors.ProgramLimitExceeded) index row size 3120 exceeds btree version 4 maximum 2704 for index "ix_recipe_instructions_text"

Mealie Version

nightly

Deployment

Docker (Synology)

Additional Deployment Details

No response

@michael-genson michael-genson added bug Something isn't working triage bug: confirmed and removed triage labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant