U123: Permission denied
SQLSTATE: 42501 (Class 42 — Syntax Error or Access Rule Violation: insufficient_privilege)
Example Postgres Log Output:
ERROR: permission denied for schema my_schema at character 25 STATEMENT: SELECT * FROM my_schema.table
This error occurs when the connected user is not allowed to access the relation or object referenced by the query.
Review whether the query was produced by a misconfiguration of an application (e.g. connecting with the wrong role), or a DBA accessing the wrong table by accident.
If you make extensive use of the Postgres role system, and allow third party access for some roles, this may also be a security relevant event, e.g. when somebody tries to enumerate which tables can be accessed by a restricted user.
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →