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] - SQLite to PostgreSQL FATAL: role "root" does not exist #3892

Open
5 of 6 tasks
jeffgallini opened this issue Jul 15, 2024 · 4 comments · May be fixed by #4577
Open
5 of 6 tasks

[BUG] - SQLite to PostgreSQL FATAL: role "root" does not exist #3892

jeffgallini opened this issue Jul 15, 2024 · 4 comments · May be fixed by #4577
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@jeffgallini
Copy link

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?

I am trying to migrate from the SQLite to PostgreSQL database for performance reasons, I have thousands of recipes and the SQLite is bogged down when searching recipes, ~30 seconds to load anything.

The backup restoration is failing.

Steps to Reproduce

  1. Install mealie postgres version https://docs.mealie.io/documentation/getting-started/installation/postgres/
  2. Upload backup
  3. In postgres alter mealie as SUPERUSER
  4. attempt to restore backup

Please provide relevant logs

Mealie:
(Background on this error at: https://sqlalche.me/e/20/e3q8)
500 Internal Server Error "POST /api/admin/backups/mealie_2024.07.15.00.15.08.zip/restore HTTP/1.1"

PostgreSQL:
[1090] FATAL: role "root" does not exist

Mealie Version

No response

Deployment

Docker (Linux)

Additional Deployment Details

Running it on a raspberry pi

@jeffgallini jeffgallini added bug Something isn't working triage labels Jul 15, 2024
@VTerret
Copy link

VTerret commented Jul 23, 2024

Log FATAL: role "root" does not exist is due to an error on docker-compose file on the installation documentation (https://docs.mealie.io/documentation/getting-started/installation/postgres/).
You must add PGUSER: mealie to postgres environment variables (cf https://stackoverflow.com/a/77171779)

@PatrickDeTomasi
Copy link

Log FATAL: role "root" does not exist is due to an error on docker-compose file on the installation documentation (https://docs.mealie.io/documentation/getting-started/installation/postgres/). You must add PGUSER: mealie to postgres environment variables (cf https://stackoverflow.com/a/77171779)

I came here to say that @VTerret is absolutely bang on, Thank you.
The "pg_isready" healthcheck tool is what requires the PGUSER environment variable and causes the script to fail.
I added the environment variable as mentioned above and everything went smoothly
I will also note that in the linked stack overflow response, there was mention to adding "-h db" to "pg_isready" but this was not necessary for me to make it work.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 11, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
@chuckfy
Copy link

chuckfy commented Nov 3, 2024

Log FATAL: role "root" does not exist is due to an error on docker-compose file on the installation documentation (https://docs.mealie.io/documentation/getting-started/installation/postgres/). You must add PGUSER: mealie to postgres environment variables (cf https://stackoverflow.com/a/77171779)

Thanks a lot!

Why is this not reflected in the postgres docker compose example? I started with a fresh install and ran into the same problem.

@hay-kot hay-kot added documentation Improvements or additions to documentation good first issue Good for newcomers and removed bug Something isn't working triage stale labels Nov 3, 2024
@hay-kot hay-kot reopened this Nov 3, 2024
This was referenced Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants