-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Avoid using public schema in Postgresql 15: (ERROR: permission denied for schema public) #3367
Comments
Thank you for the report! Could you please point to the migrations which use the public schema? :) |
Sure! I don't think I have the Postgres error logs themselves anymore, but here are the migration files that refer to a full schema identifier:
These will return an error on Postgres 15 as the |
Thank you! Anyone looking at this, we welcome contributions :) |
Preflight checklist
Describe the bug
Hello!
Postgresql 15 removed permissions to the
public
schema by default. See for instance these release notes.Just creating a schema with the same name as the database user, e.g.
hydra
, will let the user automatically use their default schema because that appears in thesearch_path
before thepublic
schema. This requires no action from Hydra.However, the problem is that some of the migrations have hardcoded references to the
public.*
schema, triggering permissions problems for the SQL of those migrations.I think it would be fine to just remove the
public.
prefix from the few migrations that have it and it's probably a mistake that that schema prefix is included anyway. Assuming the default schema ispublic
is going to become problematic as people are upgrading Postgresql to version 15 and beyond.Reproducing the bug
public
schema because they've hardcoded a fully qualified name in database referencesRelevant log output
Relevant configuration
No response
Version
v2.0.2
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response
The text was updated successfully, but these errors were encountered: