Re: [NOVICE] The server does not listen

Поиск
Список
Период
Сортировка
От Gerald Cheves
Тема Re: [NOVICE] The server does not listen
Дата
Msg-id 4415fdb6-3f0e-1600-0189-1de969b319b1@verizon.net
обсуждение исходный текст
Ответ на Re: [NOVICE] The server does not listen  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-novice
On 10/16/2017 6:52 PM, David G. Johnston wrote:
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.

For help locating your "data directory" try this

How do I find PostgreSQL's data directory?

https://dba.stackexchange.com/questions/1350/how-do-i-find-postgresqls-data-directory

And then you may have to change the PATH.

How to put psql on the path when using Postgres.app on OS X?

https://stackoverflow.com/questions/20928734/how-to-put-psql-on-the-path-when-using-postgres-app-on-os-x



-- 
siamo arrivati sani e salvi

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [NOVICE] The server does not listen
Следующее
От: Ruslan R. Laishev
Дата:
Сообщение: [NOVICE] Executing prepared statements in the multithreaded envs