Required Postgres Service Account Permissions

Hi,

I would like to use a service account when connecting to my database. What are the minimum required permissions I must grant my service account?

The following permissions are sufficient to get the data in,

GRANT SELECT, INSERT, UPDATE, REFERENCES ON ALL TABLES IN SCHEMA public

But, If I don’t use an account with broader access, the auto-generated relations aren’t working.

Hey @Huseyin_Nurbaki, and welcome to our community :wave:

By default, the SQL Datasource uses automatic schema discovery.

In order to work, the user that logs in the database must be the owner of the database as well. You can find more infos about this here.

In your case, I would suggest to “cache” the introspection result in a file, like in this example

You can also use a different strategy of using 2 different users, like in this example.

Let me know if that helps :pray: