On Azure with Ubuntu 12.04 LTS image, we're trying to change Postgres 9.3 default data and log file paths and also initialize them for the first time on a secondary drive
/mnt/pgdata. We've starting from the point where Postgres 9.3 was a fresh install via apt-get.
We've stopped postgres:
sudo service postgresql stop.
We've tried to run pg_createcluster
The following just displays the help/man pages. Probably because it's missing the version and name params.
pg_createcluster -d /mnt/pgdata/data -l /mnt/pgdata/log --start-conf auto
The following results in "Error: cluster configuration already exists" even though nothing exists in
pg_createcluster 9.3 main -d /mnt/pgdata/data -l /mnt/pgdata/log --start-conf auto
We're fairly new to Linux in general so please be specific with your answer.
Also, we have the following questions:
- Is it ok to use the direct mount path or is it better to use a symbolic link?
- Is there anything else that we need to do or change to setup Postgres 9.3 with these default data dir on the default port and to start automatically with the server?
- Any other recommendations?