I setup a postgres cluster on an external hard drive. To create the cluster I used, pg_createcluster -d /path/to/external/hdd
.
pg_lsclusters
shows that the data directory is pointed to the external hdd. However, after I start the cluster with
pg_ctlcluster 10 <cluster_name> start
and connect to the cluster,
psql -U postgres -p 5433
After I login and execute show data_directory
the data directory is correctly pointed to on the external hdd however the conf files are shown to be on my local machine in the /etc/postgresql/10/<cluster_name>
directory. Inside the directory are the following files, pg_ctl.conf, pg_ident.conf, start.conf, environment, pg_hba.conf, postgresql.conf
and the directory conf.d
.
Two main questions,
1/ am I logging into the external HDD cluster correctly? The cluster on the external HDD is on part 5433 but the main
cluster is also active on the local machine on the default port 5432.
2/ have I setup the external cluster correctly? Should the conf files be on the local machine? I thought it would make more sense for the conf files to be on the external HDD also especially if in the future I want to backup the external HDD cluster such that it is self contained or if in the event my local machine fails.
/etc/postgresql/10/
just a symlink?pg_createcluster -d /path/to/data
and the folder is not a symlink. I've also added the list of files found in the directory.