Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:
  2. ```bash
  3. service postgresql restart
  4. ```
  5.  
  6. When the `service` command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=`postgres`).
  7. ```bash
  8. user# sudo su postgres
  9. postgres# pg_ctl reload
  10. ```
  11.  
  12. If it complains about not having a data directory, you'll have to do it from within PostgreSQL itself.
  13. ```bash
  14. psql -U postgres
  15. postgres=> SELECT pg_reload_conf();
  16. ```
  17.  
  18. If that doesn't work (like modiying the listening addresses or ports) then you may just have to restart the machine. If it doesn't autostart, start the postgresql service/process.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement