The situation is the following:
I have install the postgresql-9.3 with command
sudo apt-get install postgresql-9.3:
and then use pg_ctl to start the server
pg_ctl -D /var/lib/postgresql/9.3/main -Z coordinator start
which causes following error:
18:23:50 CEST FATAL: database files are incompatible with server 2014-07-14 18:23:50 CEST DETAIL: The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.2.4.
I have no idea where comes the version 9.2.4, I have checked all my folders about Postgres, they all under folder 9.3 and even tried pg_clusters. Can anyone give some hints to fix this?
dpkg -l | grep postgres gives the result:
ii postgres-xc 1.1-2ubuntu2 amd64 write-scalable, synchronous multi-master, transparent PostgreSQL cluster
ii postgres-xc-client 1.1-2ubuntu2 amd64 front-end programs for Postgres-XC
rc postgresql-9.3 9.3.4-1 amd64 object-relational SQL database, version 9.3 server
rc postgresql-client-common 154 all manager for multiple PostgreSQL client versions
rc postgresql-common 154 all PostgreSQL database-cluster manager
I have tried once to delete "everything", and reinstall them again now I have the output of dpkg -l | grep` postgres:
ii postgresql-9.3 9.3.4-1 amd64 object-relational SQL database, version 9.3 server
ii postgresql-client-9.3 9.3.4-1 amd64 front-end programs for PostgreSQL 9.3
ii postgresql-client-common 154 all manager for multiple PostgreSQL client versions
ii postgresql-common 154 all PostgreSQL database-cluster manager
now everything looks fine, when I try to start the server with pg_ctl the command line tells me:
The program 'pg_ctl' is currently not installed. You can install it by typing:
sudo apt-get install postgres-xc
Is there any other way to start the server? Should I install postgres-xc following the advise?
Thank you
dpkg -l | grep postgres.which pg_ctlin shell and check if you are using correct verion of installed postgres?pg_ctldoes not support a parameter-Z. It seems you are mixing your Postgres-XC and and PostgreSQL installs.pg_ctl --versionto make sure you're running the rightpg_ctl