Skip to content

Instantly share code, notes, and snippets.

@ChengLong
Created March 14, 2016 09:35
Show Gist options
  • Save ChengLong/f3f31ec3ce23c29b6cec to your computer and use it in GitHub Desktop.
Save ChengLong/f3f31ec3ce23c29b6cec to your computer and use it in GitHub Desktop.
Postgres Commands

Check status

pg_ctl status -D /usr/local/var/postgres

Start at a data dir and a log file

pg_ctl start -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log

Stop

pg_ctl stop -D /usr/local/var/postgres

Create user

createuser foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment