Re: [NOVICE] The server does not listen - Mailing list pgsql-novice

From Gerald Cheves
Subject Re: [NOVICE] The server does not listen
Date
Msg-id 4415fdb6-3f0e-1600-0189-1de969b319b1@verizon.net
Whole thread Raw
In response to Re: [NOVICE] The server does not listen  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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 by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [NOVICE] The server does not listen
Next
From: Ruslan R. Laishev
Date:
Subject: [NOVICE] Executing prepared statements in the multithreaded envs