O'Reilly logo

Learning Heroku Postgres by Patrick Espake

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Heroku client with Postgres

The Heroku Postgres add-on is integrated with the Heroku client, which provides commands that allow you to automate and perform tasks to manage your PostgreSQL database hosted on Heroku.

All these commands are available through the namespace pg. You will get an overview of each of these commands in upcoming sections. Open a Terminal and type the following commands.

The pg:info command

This command provides the following statistics and information on your database:

  • The connection variable
  • The current database plan
  • The number of connections
  • The PostgreSQL version
  • The database's creation date
  • The database size
  • The number of tables
  • The number of available lines if the database plan is Hobby tier

It also informs whether Fork/Follow/Rollback ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required