Postgres was running just fine (I have created a database using template0
). Then, I used:
$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop --mode=smart
to stop Postgres and it stopped without a fuss. Then, I used:
$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /var/log/postgres/serverlog start
server starting
and it appeared to start without a fuss... but then:
$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data status
pg_ctl: no server running
Just to be sure, a ps aux | grep postgres
returns nothing.
Why would this happen?
Note: I'm logged in as postgres
and /usr/local/pgsql/data
dir is recursively owned by postgres
, but worth noting is that the postgres
is using /etc/sh
vs /etc/bash
since I was stupid and used useradd
vs adduser
. I'm on Ubuntu 12.04.2 and running Postgres 9.2.4.