Re: [NOVICE] The server does not listen

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [NOVICE] The server does not listen
Дата
Msg-id CAKFQuwYbuMALaBK6VTJriG79cQrcg7NKwdPaLe8dEve-xO5yGw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [NOVICE] The server does not listen  (manno_it@libero.it)
Ответы Re: [NOVICE] The server does not listen
Список pgsql-novice
On Mon, Oct 16, 2017 at 3:15 PM, <manno_it@libero.it> wrote:

-Pro-di-Mauro-Bonetti:~ mauro$ pg_ctl -D  /Users/postgres/bin/pg_ctl start

-bash: pg_ctl: command not found

I'd suggest installing the database application (9.2) from scratch and get everything working with an empty database.  Then learn what the "data directory" is, find your old one, and replace the "data directory" that was created during the fresh installation with the data directory from the previous installation.

As for the command you ran:

The pg_ctl is apparently not in user "mauro"'s PATH
The -D argument should point to the "data directory", not the pg_ctl executable (how did you even come to write that particular command?)
Usually one does not run the database under a login user account but rather has "postgres" run it.  That the executable is under  /Users/postgres supports this.

Ideally you'd have an actual back-up and so after you install from scratch you can simply restore the backup into the running database instead of manipulation directories at the O/S level.

David J.

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

Предыдущее
От: manno_it@libero.it
Дата:
Сообщение: Re: [NOVICE] The server does not listen
Следующее
От: Gerald Cheves
Дата:
Сообщение: Re: [NOVICE] The server does not listen