PostgreSQL 9.4 failed to start on Manjaro
After setting up Manjaro on my new working laptop, I installed PostgreSQL 9.4. When I want to start the service by running
sudo systemctl start postgresql, postgresql keep failing to start.
Apparently before PostgreSQL can function correctly on Arch Linux based distro, the database cluster must be initialized by the postgres user. Fix this just by running the following command:
sudo -i -u postgres initdb --locale en_US.UTF-8 -E UTF8 -D '/var/lib/postgres/data'