Postgresapp: Switch version via console

Created on 24 Apr 2017  路  2Comments  路  Source: PostgresApp/PostgresApp

I am constantly switching versions when working on multiple projects. Currently, we have to turn one version off, turn the other on via the mac toolbar. It's a huge improvement from the previous version where I kept a few PG.app versions so thank you.

Feature request to allow us to switch version via console, it'd be really helpful. Thanks a lot for the work by the way.

Most helpful comment

You can start and stop the servers from the command line with pg_ctl. (just make sure to use the right version)

Example to stop 9.6 and start 9.5:

/Applications/Postgres.app/Contents/Versions/9.6/bin/pg_ctl stop -w -D '/Users/jakob/Library/Application Support/Postgres/var-9.6'
/Applications/Postgres.app/Contents/Versions/9.5/bin/pg_ctl start -w -D '/Users/jakob/Library/Application Support/Postgres/var-9.5'

For more info, read man pg_ctl

All 2 comments

You can start and stop the servers from the command line with pg_ctl. (just make sure to use the right version)

Example to stop 9.6 and start 9.5:

/Applications/Postgres.app/Contents/Versions/9.6/bin/pg_ctl stop -w -D '/Users/jakob/Library/Application Support/Postgres/var-9.6'
/Applications/Postgres.app/Contents/Versions/9.5/bin/pg_ctl start -w -D '/Users/jakob/Library/Application Support/Postgres/var-9.5'

For more info, read man pg_ctl

Nice! Thank you very much. Didn't know this exists. Closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eddiejaoude picture eddiejaoude  路  4Comments

tarasinghmc picture tarasinghmc  路  7Comments

elpop picture elpop  路  7Comments

wellsoliver picture wellsoliver  路  4Comments

songproducer picture songproducer  路  10Comments