Issue with relationships not showing in a database and cannot be configured (web interface)

Hi there :waving_hand:

Thanks to your message, we found why relationships are not discovered, but unfortunately we haven’t been able to solve the problem.

We have the following setup using Postgres:

  • Admin user, used to run database migrations.
  • API user, used by the API.
  • Forest Admin user, used by the Forest Admin agent (we’re self-hosting).

When running locally, it’s easy enough to use the admin user for Forest Admin so we get relationships; however, when the app is deployed, we’d prefer to avoid that.

I cannot get the Forest Admin user to access records in the information_schema.constraint_column_usage view; access itself is fine, the SELECT statement works, but the result set is empty.

We found several people with the same problem (see this Stack Overflow post for example), however the solution seems to be either:

  1. Get the constraint information some other way, which we can’t change as that’s implemented in Forest Admin, or
  2. Change the ownership of the schema/tables to the Forest Admin user, which we can’t do either as that would impact the ability of the migrations user to run migrations.

Any chance you’ve come across this and found a way to get a non-admin user to view records in information_schema.constraint_column_usage?