You can setup Grafana to use Postgres as its database, but it isn’t clear what permissions the DB user needs. Is the minimal set of privileges documented anywhere? When we removed superuser permissions from the “grafana” user, we ran into errors on startup:
logger=migrator t=2022-11-03T15:28:29.559168219Z level=error msg="Executing migration failed" id="add index correlations.uid" error="pq: permission denied for schema public"
I agree that permission detail should be in the docu. But you should never give superuser permissions to anyone other than dba,
I think this is more of a postgres question than grafana.
But that said I would give that user explicit CRUD permissions
Check one example here
We don’t want to give superuser permissions to the user. We tried granting the user “CTc” privileges on the DB (docs) and received the error I posted above.
I would argue that this is not a Postgres question - there’s no way of knowing what all the grafana user needs to do without reading through Grafana’s source. This should be documented somewhere.