Is it possible to block the access of a super user? In a scenario that the databases run on the client's server.
Company &quot;A&quot; has a database installed on that server. The customer hires the services of a company &quot;B&quot;, which will also install its database on the server.
If company &quot;B&quot; uses a super user, it can have access to the company &quot;A&quot; database. It may even try to harm company &quot;A&quot; by changing information in the database.
Is there a way to block super user access to company &quot;A&quot; database?
That should be easy. Put the databases in different PostgreSQL clusters on the same server.
But even if both databases are in the same cluster, a superuser can only access the database if there is a line in pg_hba.conf that allows it. So you can achieve the goal with a properly configured pg_hba.conf file. That requires that the superuser is known by name – you cannot add a line that says “block all superusers from that database”.