Re: Error message "psql: could not connect to server: No such file or directory" - Mailing list pgsql-general

From Craig Ringer
Subject Re: Error message "psql: could not connect to server: No such file or directory"
Date
Msg-id 4FE6B884.4060508@ringerc.id.au
Whole thread Raw
In response to Re: Error message "psql: could not connect to server: No such file or directory"  (Stefan Schwarzer <stefan.schwarzer@unep.org>)
Responses Re: Error message "psql: could not connect to server: No such file or directory"
List pgsql-general
On 06/22/2012 03:19 PM, Stefan Schwarzer wrote:
>> sudo su - _postgres /usr/local/pgsql-9.1/bin/initdb -U postgres -D /usr/local/pgsql-9.1/data --encoding=UTF8
--locale=en_US
>> sudo su - _postgres /usr/local/pgsql-9.1/bin/pg_ctl start -D /usr/local/pgsql-9.1/data
>>
>> Although I don't get an error message, I don't have the feeling that it started the server. There is still nothing
inthe process list, and a normal "psql" results in the same message as before "psql: could not connect…" 
>>
>> So sorry for bothering you guys… just being really frustrated now…
>>
>> If you have any ideas, please let me know… :-)
> I just went back to the postgres documentation [1] (actually reading all google results on the error message one
afterthe other) and tried out what was said there (adapted to my conditions): 
>
> sudo -u _postgres /usr/local/pgsql-9.1/bin/postgres -D /usr/local/pgsql-9.1/data
>
> and suddenly postgres runs….
>

You really should be able to use pg_ctl though.

I'm puzzled about why you don't appear to be looking at the server error
logs (/usr/local/pgsql-9.1/data/pg_log) during troubleshooting. They're
your main source of info.

--
Craig Ringer

pgsql-general by date:

Previous
From: Raghavendra
Date:
Subject: Re: row_to_json question
Next
From: Tim Uckun
Date:
Subject: Hot standby streaming replication doesn't work