From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Error message "psql: could not connect to server: No such file or directory" |
Date: | 2012-06-19 13:58:43 |
Message-ID: | 4FE08593.2010308@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 06/19/2012 01:32 AM, Stefan Schwarzer wrote:
>
> I need unfortunately to come back to this issue. I (again) re-installed Lion from scratch, and finally got everything working. The Postgres was running, I uploaded a couple of dumped SQL files. And then re-started the machine for another reason. And suddenly it says again the it can't connect to the server.
>
> I tried
> /usr/local/pgsql-9.1/bin/initdb -U postgres -D /usr/local/pgsql-9.1/data --encoding=UTF8 --locale=en_US
>
> and
> /usr/local/pgsql-9.1/bin/pg_ctl -D /usr/local/pgsql-9.1/data/ -l logfile start
>
> and
> sudo launchctl load /Library/LaunchDaemons/org.postgresql.postgres.plist
>
> … but nothing happens. I don't have the feeling that it's a problem with the "postgres" and "_postgres" users (as it has worked before already).
>
> Can anyone give me a hint how I can figure out where the problem lies and what I can do about it? Why did it work before I restarted the computer and why does it not work anymore?
>
> Thanks a lot for any hints!
>
When troubleshooting I am firm believer in working from the known to the
unknown. In that vein:
1) Is there /usr/local/pgsql-9.1/data/?
a) If so are there subdirectories in it indicating cluster was
created? i.e. base/ global/ pg_clog/, etc
b) If not is there a Postgres data directory anywhere on machine?
2) When you say nothing happens does that mean nothing is written to log
file and/or terminal? No process shows up in process list?
3) If something does happen in, terms of error messages, what are they?
4) Have you looked at system (not Postgres specific) logs to see if this
a system issue?
5) What user are you running the above commands as?
a) What user is associated with the Postgres data directory(if it
exists)?
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2012-06-19 14:04:26 | Re: Feature discussion: Should syntax errors abort a transaction? |
Previous Message | aasat | 2012-06-19 13:52:45 | Re: SELECT INTO create new table, how to turn off this feature? |