Created
November 6, 2012 18:03
-
-
Save matthewcopeland/4026415 to your computer and use it in GitHub Desktop.
Postgres start/stop commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start Postgres | |
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
# Stop Postgres | |
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alias them how you like, here's an example that I use. | |
# Copy and paste this into your .bashrc or .bash_profile (whichever you use). | |
alias pgsqlstart="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start" | |
alias pgsqlstop="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop" | |
#--------------------------------------- | |
# Now to start Postgres, just type | |
$ pgsqlstart | |
# To Stop Postgres, | |
$ pgsqlstop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment