Skip to content

Instantly share code, notes, and snippets.

@eprothro
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eprothro/527526829422c8dd19d4 to your computer and use it in GitHub Desktop.
Save eprothro/527526829422c8dd19d4 to your computer and use it in GitHub Desktop.
View Heroku Postgres configuration settings

Run PG:PSQL

With pg installed, you can run the pg:psql Heroku command to connect to your database and execute commands using the psql interactive terminal:

$ heroku pg:psql
psql (9.3.5, server 9.3.3)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
database-name=> |

View configuration settings

Heroku tunes postgres server configuration settings, so settings are not necessarrily the defaults. Use the pg_settings view to see what the config settings are on your actual dabatase instance:

database-name=> select name, short_desc, setting from pg_settings where name like '%constraint_exclusion%';
         name         |                         short_desc                          |  setting
----------------------+-------------------------------------------------------------+-----------
 constraint_exclusion | Enables the planner to use constraints to optimize queries. | partition
(1 row)

Close the PG:PSQL connection

database-name=> \q
$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment