Fix permission issue on postgresql15 or later#176
Open
kkimurak wants to merge 2 commits intosameersbn:masterfrom
Open
Fix permission issue on postgresql15 or later#176kkimurak wants to merge 2 commits intosameersbn:masterfrom
kkimurak wants to merge 2 commits intosameersbn:masterfrom
Conversation
fix: specify database to GRANT ALL ON SCHEMA public TO ${DB_USER}
Closed
If it is set to true, issue `ALTER DATABASE .. OWNER TO ${DB_USER}`
6e5f997 to
903331e
Compare
Contributor
Author
|
Fixed typo in docs: parameter name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostgreSQL 15 or later removed PUBLIC creation permission on the public schema. As
sameersbn/postgresqldoes not have a way to set database owner, user can face permission issue. See https://www.postgresql.org/docs/15/release-15.htmlThis PR ports following fixes from my fork kkimurak/sameersbn-postgresql.
Add parameter
DB_USER_IS_DB_OWNER. If it is set to true,DB_USERwill become an owner of database listed inDB_NAME. This can be direct fix of the issue.note: This change is ported from Add parameter
DB_USER_IS_DB_OWNER(boolean) kkimurak/docker-postgresql#10, included in releases 20250717 and later and is available for testing.Grant ALL privileges on the public schema to
DB_USERifDB_USER_IS_DB_OWNERis not set to true.This was introduced as a temporary workaround based on the error message displayed in discussion to update sameersbn/gitlab to 18.0.0 (See Upgrade GitLab CE to 18.0.0 docker-gitlab#3107 (comment)).
It was later confirmed in the official documentation that the owner of the database itself was changed, and this workaround may not be correct (although it works). Therefore, I will revert this change if requested.
note: This change is ported from GRANT ALL ON SCHEMA public TO ${DB_USER} kkimurak/docker-postgresql#1 and fix: specify database to GRANT ALL ON SCHEMA public TO ${DB_USER} kkimurak/docker-postgresql#5, included in release 20250518 or later and is available for testing.