Re: The server does not listen

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: manno_it(at)libero(dot)it
Cc: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>, Payal Singh <payal(at)omniti(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: The server does not listen
Date: 2017-10-16 22:52:11
Message-ID: CAKFQuwYbuMALaBK6VTJriG79cQrcg7NKwdPaLe8dEve-xO5yGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Oct 16, 2017 at 3:15 PM, <manno_it(at)libero(dot)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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Gerald Cheves 2017-10-17 05:31:48 Re: The server does not listen
Previous Message manno_it 2017-10-16 22:15:16 Re: The server does not listen