Cannot use commands 'postgres' or 'pg_ctl'

installation, postgresql

Solution

This must be remnants of the `postgres-xc` package you had installed previously.

Since you just installed `postgresql-9.3` and don't seem to have any databases in use, yet, I suggest to completely purge all postgres packages.

sudo apt-get purge postgresql-9.2
sudo apt-get purge postgresql-xc
...

Until there's nothing left:

dpkg -l | grep postgres

Then start from scratch. Your instance of `pg_ctl` seems to belong to the package `postgres-xc`. This should be gone after you've uninstalled the package. Find out with one of these commands:

dpkg -S pg_ctl
dlocate pg_ctl
apt-file search pg_ctl

`pg_ctlcluster` is provided by the package `postgresql-common`. `pg_ctl` is provided by the package `postgresql-9.3`.

More about starting Postgres in the manual.

Problem

I am on Unix. I have got postgresql-9.3 installed. When I want to start the server using `pg_ctl` or `postgres`, the terminal gives me: ``` The program 'postgres' is currently not installed. You can install it by typing: sudo apt-get install postgres-xc ``` Can't I start the server without this postgres-xc?

Original source

Related problems