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

Grant Schema Permissions for PostgreSQL 15+ Compatibility #1614

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

varshil-shah
Copy link

@varshil-shah varshil-shah commented Jan 21, 2025

With PostgreSQL 15 and onwards, there has been a change in the way table creation permissions are handled for users. Not directly related to pgAdmin 4, but I think people may run into this.

Normally, after allowing a user to CREATE tables within a database, you didn't have to specifically define that they had the permission to do that within a SCHEMA, since public would be the default one.

With PostgreSQL 15, this has changed source

PostgreSQL 15 also revokes the CREATE permission from all users except a database owner from the public (or default) schema.

ERROR: permission denied for schema public

The error occurred during the installation of Alfresco using the ZIP installer with PostgreSQL 17.
To fix this, I added the following two lines to the PostgreSQL configuration:

GRANT ALL ON SCHEMA public TO alfresco
GRANT USAGE ON SCHEMA public TO alfresco

With PostgreSQL 15 and onwards, there has been a change in the way table creation permissions are handled for users. Not directly related to pgAdmin 4, but I think people may run into this.

Normally, after allowing a user to CREATE tables within a database, you didn't have to specifically define that they had the permission to do that within a SCHEMA, since public would be the default one.

With PostgreSQL 15, this has changed (https://www.postgresql.org/about/news/postgresql-15-released-2526)

PostgreSQL 15 also revokes the CREATE permission from all users except a database owner from the public (or default) schema.

Error message:
ERROR: permission denied for schema public

Above error occurred while installing Alfresco using ZIP installer using postgres version 17.
@varshil-shah varshil-shah requested a review from a team as a code owner January 21, 2025 04:16
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.

1 participant