I am using centos 6 and installed Postgresql_9.4 using the following commands

yum  install postgresql postgresql-contrib postgresql-client pgadmin3
yum install postgresql-server

After that i verified my config file or "Show data_directory" command to verify that data folder path. Its showing /var/lib/pgsql/9.4/data but am also having the another data folder in this location /var/lib/pgsql/data.

data path 1 --> /var/lib/pgsql/9.4/data

data path 2 --> /var/lib/pgsql/data

My question is which is my original data folder ??. And Also my exact data folder is configured in config file means what is the use of another data folder ?


On a terminal, type

systemctl cat 'postgresql*'

That will show you where the PGDATA environment variable is pointing to when you start the service normally via systemd, and all the parameters used for starting and stopping the service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.