Re: Error message "psql: could not connect to server: No such file or directory"

Поиск
Список
Период
Сортировка
От Stefan Schwarzer
Тема Re: Error message "psql: could not connect to server: No such file or directory"
Дата
Msg-id 01F83EDC-49B3-498A-8FFD-681EFDB6B8AC@unep.org
обсуждение исходный текст
Ответ на Re: Error message "psql: could not connect to server: No such file or directory"  (Stefan Schwarzer <stefan.schwarzer@unep.org>)
Ответы Re: Error message "psql: could not connect to server: No such file or directory"  (Adrian Klaver <adrian.klaver@gmail.com>)
Список pgsql-general
>>> I guess this is a typical user error. I searched around to find the solution, but in vain.
>>>
>>> I just upgraded to Lion, and used Kyngchaos libraries for installation of Postgres.
>>>
>>> Try to get running postgres, and I get this:
>>>
>>>      /usr/local/pgsql-9.1/bin/psql -U postgres
>>>      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"?
>>>
>>>
>>> In my limited understanding, it seems that Postgres is not running. When I use:
>>>
>>>       ps auxw | grep post
>>>
>>> out comes only the "grep post", but no postgres process.
>>>
>>> When I use:
>>>
>>>       sudo launchctl load /Library/LaunchDaemons/org.postgresql.postgres.plist
>>>
>>> it says:
>>>
>>>       org.postgresql.postgres: Already loaded
>>>
>>> and displays in the "ps" list then:
>>>
>>>       user        935   0.0  0.1  2493888   7296   ??  Ss    3:24PM   0:00.12
/System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper-uuid
9EFB9424-7971-4A8B-9D73-B93BD7F1DB5F-post-exec 4 
>>>
>>> (which looks a bit strange to me (DiskImages ??))
>>>
>>>
>>> I am somewhat lost (and worse is that it worked the other day, before re-installing Lion anew.).
>>

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
hasworked 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
beforeI restarted the computer and why does it not work anymore? 

Thanks a lot for any hints!

В списке pgsql-general по дате отправления:

Предыдущее
От: pandorino
Дата:
Сообщение: pgstat wait timeout : permission denied
Следующее
От: Sergey Konoplev
Дата:
Сообщение: Re: Fine-grained replication?