26
votes

As the title states, if I connect to my heroku posgresql DB via pgAdmin4 I see many other databases which I am not allowed to access.

I know there must be a restrction DB field somewhere but I cant find it.

In pgAdmin4 its not in the advanced tab as stated here:

StackOverflow similar Question pgAdmin3

2
Postico directly opens the specified database instead of forcing you to find it like pgAdmin 4. - Cees Timmerman
At the moment you can't, there is a bug issue on this problem and hope it will be solved on bug fixes - Serjik

2 Answers

7
votes

Actually, you can hide the rest of databases. When you fill in all credentials and connections parameters for the serevr, in order to avoid parsing so many databases, we have to white list only those databases we care about. Go to the Advanced tab and under db restriction copy the database name (it’s the same value as the Maintenance database field filled earlier). Remember - you have to set up this parameter BEFORE you hit "Save" as you cannot modify this field after saving. Source: https://medium.com/@vapurrmaid/getting-started-with-heroku-postgres-and-pgadmin-run-on-part-2-90d9499ed8fb

1
votes

You're probably using a Hobby-Dev or Hobby-Basic database. These used shared infrastructure. Although you can see the other (obfuscated) DB's in the list, you do not have access to them. To avoid seeing them, specify the DB name in your connection settings in pgAdmin.