Skip to content

Instantly share code, notes, and snippets.

@pavelz
Last active August 29, 2015 14:01
Show Gist options
  • Save pavelz/0c50de16f193df574b63 to your computer and use it in GitHub Desktop.
Save pavelz/0c50de16f193df574b63 to your computer and use it in GitHub Desktop.
Last login: Fri May 23 01:35:21 on ttys001
➜ ~ pg_ctl -D /usr/local/var/postgres -m f stop
waiting for server to shut down......................................^C
➜ ~ which pg_ctl
/usr/local/bin/pg_ctl
➜ ~ which pg_ctl -V
/usr/local/bin/pg_ctl
-V not found
➜ ~ which pg_ctl -v
/usr/local/bin/pg_ctl
-v not found
➜ ~ pg_ctl -v
pg_ctl: invalid option -- v
Try "pg_ctl --help" for more information.
➜ ~ pg_ctl -V
pg_ctl (PostgreSQL) 9.3.3
➜ ~ pg_ctl -D path status
pg_ctl: no server running
➜ ~ pg_ctl -D /usr/local/var/postgres start
pg_ctl: another server might be running; trying to start server anyway
server starting
FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster (PID 25763) running in data directory "/usr/local/var/postgres"?
➜ ~ pg_ctl -D /usr/local/var/postgres restart
waiting for server to shut down..................^C
➜ ~ pg_ctl -D /usr/local/var/postgres status
pg_ctl: server is running (PID: 25820)
/usr/local/Cellar/postgresql/9.3.3/bin/postgres "-D" "/usr/local/var/postgres" "-r" "/usr/local/var/postgres/server.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment