How do I connect to a Private Space Postgres database externally? e.g. via PgAdmin

Resolution

Databases in a Private Space (using the private tier plan) cannot be accessed from computers outside of the private space unless the heroku command line tools are used, meaning that tools like PgAdmin cannot normally be used https://devcenter.heroku.com/articles/heroku-postgres-and-private-spaces#external-connections

To work on these databases, you can use the Heroku command line tools to establish a database console session with

heroku pg:psql

and run SQL commands from there.

Alternatively you have the option of white listing a limited number of Trusted IPs to provide access. These can be managed via the Heroku Dashboard https://devcenter.heroku.com/articles/private-spaces#trusted-ip-ranges

Migrating data from Common Runtime to Private Spaces

We have additional advice on this process here: https://devcenter.heroku.com/articles/migrating-heroku-postgres-databases-to-private-spaces