PostgreSQL authentication can be controlled using the pg_hba.conf file to specify what IP addresses have access to the postgres database. After making changes to this file you should never reboot the server but instead signal it to reload this configuration file. Follow the below steps to reload.
1. Postgres User:
- su - postgres
2. Make Changes:
- vi /var/lib/pgsql/data/pg_hba.conf
3. Reload Configs:
- pg_ctl reload -D /var/lib/pgsql/data/
Give it a couple minutes for the SIGHUP to occur and then test your changes. This allows you to make changes to pg_hba.conf without interupting service for users. The below book is a great reference for PostgreSQL administration.
Thanks.
Hello dome,
Sure, no problem at all. Thanks for taking the time to leave feedback about the postgres pg_hba.conf article. It is always nice to hear from users that find articles helpful.
Thanks.
alex
Thanks this is exactly what I was looking for before I ran a reload on my Live site.
Hello David,
No problem at all. Thanks for taking the time to leave feedback.
Thanks.
alex
Thanks for the information provided.
Is this suppose to work with the postgresql.conf file changes too? I have tried it and it doesnt work.
Can you help please?
Thanks