I've had no luck in starting the postgres server. I can add new databases, tables, etc to the postgres from the terminal, but can't add things to the tables through a webpage. The webpage is running on a localhost for now.
The postgres data folder was originally created in a root user, but I moved it to my own user account and it solved many problems, but I'm back at the same old error I keep getting after entering postgres -D data (data being the data cluster folder)
EDT LOG: could not bind IPv4 socket: Address already in use
2015-06-18 11:11:35 EDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2015-06-18 11:11:35 EDT LOG: could not bind IPv6 socket: Address already in use
2015-06-18 11:11:35 EDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2015-06-18 11:11:35 EDT WARNING: could not create listen socket for "*"
2015-06-18 11:11:35 EDT FATAL: could not create any TCP/IP sockets
I tried two different commands to start the server.
pg_ctl -D data -l logfile start
which gave me this, but it's not correct
server starting
and
pg_ctl -D /Library/PostgreSQL/9.4/data -l log file start
which gave me this
LOG: skipping missing configuration file "/Library/PostgreSQL/9.4/data/postgresql.auto.conf"
pg_ctl: another server might be running; trying to start server anyway
server starting
The postgresql.auto.conf file is most definitely there with correct name and everything. If I try to stop the supposedly started server it results in this with the first one from the first command I tried and the second stop with the second command.
Is server running?
and
LOG: skipping missing configuration file "/Library/PostgreSQL/9.4/data/postgresql.auto.conf"
pg_ctl: could not send stop signal (PID: 83): Operation not permitted