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

docs: specify database and user role when running psql #2891

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

langfingaz
Copy link
Contributor

@langfingaz langfingaz commented Jan 19, 2024

During the steps to re-import a PostgreSQL dump, the tool psql is used twice.

On first usage, the database and user role are specified:

cat ~/tandoor.sql | sudo docker exec -i {{database_container}} psql postgres -U {{djangouser}}

At the second time, psql is run without any arguments:

docker exec -it {{database_container}} psql

This gave me the following error:

psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "root" does not exist

If I am not wrong, we should specify the database and user role here, as well. This is fixed by this merge request:

docker exec -it {{database_container}} psql postgres -U {{djangouser}}

Edit: I noticed this during my upgrade from postgres:11-alpine to postgres:16-alpine

@vabene1111
Copy link
Collaborator

yes that makes sense, thank you very much

@vabene1111 vabene1111 merged commit a1da77f into TandoorRecipes:develop Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants