I'm installing a
Postgresql-9.4 HA environment in
RHEL 7, when I initialize postgres db - it creates a data directory and within the data directory goes
pg_hba.conf files. Here, I anticipate the creation of config files in data directory creates a collision, as it gets overridden during the master replication.
So, I'm trying to relocate the
pg_hba.conf files from the data directory and make
postgres service to use the relocated config files. Where do I updated the path of the config files?
Update: I've updated the PGDATA in
/usr/lib/systemd/system/postgresql-9.4.service to point the relocated conf files. In the new postgres.conf file, updated data directory and hba_file paths. And I tried to restart the service, then it returns an error
Job for postgresql-9.4.service failed. See 'systemctl status postgresql-9.4.service' and 'journalctl -xn' for details.