0
votes

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?a_horse_with_no_name
@a_horse_with_no_name Mac OS X - only thing with launchdCraig Ringer

2 Answers

3
votes

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.

0
votes

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