Move PostgreSQL9.6 data directory to a different directory in CentOS 7
We wanted to move the PostgreSQL9.6 default data directory to home directory in centos7 due to space constraints of the partition we had in our root directory. So below are the steps to move default data directory of PostgreSQL to /home directory
Create a directory in /home for postgres data
Login as root and execute below commands
user$ su -l ...