0

I have had problems with postgres after I replaced my original postgres installation with a homebrew installation.

After boot, if I issue the psql command, I get:

psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

If I run:

ps auxwww | grep postgres

I get this weird output:

paulcowan 2829 0.0 0.0 2432784 540 s000 R+ 9:17am 0:00.00 grep postgres

And if I run:

ps -ef | grep postgres

I get:

501 2842 1040 0 9:19am ttys000 0:00.00 grep postgres

If I then run:

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

Everything starts.

I have tried to get postgres to start on login and I enter this command:

 ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

Followed by this:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

I get this error:

launchctl: Couldn't stat("/Users/paulcowan/Library/LaunchAgents/homebrew.mxcl.postgresql.plist"): No such file or directory nothing found to load

2
  • Which operating system are you using? Commented May 26, 2014 at 19:37
  • @a_horse_with_no_name Mac OS X - only thing with launchd Commented May 27, 2014 at 5:45

2 Answers 2

3

You are piping the output of ps through grep, and grep is finding itself, because grep's visible command line contains the string being searched for. Not weird at all.

There is no rogue PostgreSQL process.

Sign up to request clarification or add additional context in comments.

1 Comment

+1, this is what is happening here according to me too.
0

Seams that this is not a postgresql problem. It is linux related especially to your platform.

However, take a look at the default postgresql installation. Depending on linux flavour there are different start scripts in /etc/init.d or /lib/systemd

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.