Heroku PostgreSQL Version Check Method and Command: heroku pg:info

Tadashi Shigeoka ·  Sun, August 20, 2017

I’ll introduce how to check the version currently in use and available versions in Heroku PostgreSQL.

Heroku

Heroku PostgreSQL Available Version Check Site

The versions available in Heroku PostgreSQL can be checked from the official Heroku Dev Center site.

Currently (August 20, 2017), the default version appears to be 9.6.

Version support and legacy infrastructure PostgreSQL 9.2 is no longer supported. No new provisions are allowed.

The version of Postgres you want to run can be specified by using the —version flag within the Heroku CLI. The PostgreSQL project releases new major versions on a yearly basis. Each major version, once released, will be supported shortly after by Heroku Postgres. Heroku Postgres will support at least 3 major versions at a given time. Currently supported versions are:

9.6 (default) 9.5 9.4 9.3 9.2 (deprecated)

Heroku PostgreSQL Version Check Command

The version of Heroku PostgreSQL currently in use can be checked with the heroku pg:info command.

When I executed the heroku pg:info command on a recently created Heroku app, the results were as follows:

heroku pg:info
=== DATABASE_URL
Plan:                  Hobby-dev
Status:                Available
Connections:           0/20
PG Version:            9.6.2
Created:               2017-08-20 20:44 UTC
Data Size:             7.2 MB
Tables:                2
Rows:                  1/10000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-flexible-12345

That’s all from the Gemba, where I wanted to know the Heroku PostgreSQL version for CircleCI initial setup.