How to connect to my shared heroku database for postgresql?

I pulled SHARED_DATABASE_URL from heroku configuration

SHARED_DATABASE_URL => postgres://username: xxxx@host.com /db_name 

I use pgAdmin to try to connect to it, but it continues to fail. Do I need to specify a port? What am I missing?

+4
source share
3 answers

You cannot access the shared database using psql, pgadmin, etc.

Heroku offers you the choice of working in a general or special database package. The overall plan is suitable for developing and hosting applications. It runs Postgres 8.3. Special plans are suitable for production scale applications. In addition, dedicated databases offer a number of advantages: including direct access (via psql or any native postgres library) , stored procedures, and Postgres 9 support. [Source]

0
source

You can use this command to connect to psql.

heroku pg:psql

+18
source

If you are happy to migrate to postgres 9.1, you can use the newly created development database, which allows you to connect through the usual postgres tools. More details at https://postgres.heroku.com/blog/past/2012/4/26/heroku_postgres_development_plan/

+3
source

Source: https://habr.com/ru/post/1413606/


All Articles