please somebody tell me how to restart PostgreSQL service in windows 10 when updating pg_hba.config, and the steps to allow remote connections to a psql database please
You don't need to restart the service to activate changes done to pg_hba.conf
.
All you need to do is to reload the configuration.
You can re-load all configuration files using a SQL statement, e.g. from within psql
- but any SQL client will do:
select pg_reload_conf();
You must log-in to Postgres as a database super user (typically postgres
).
pg_ctl
pg_ctl
can be used to signal a reload to the server
pg_ctl reload -D \path\to\datadirectory
The data directory is the one you specified during installation. If you don't know where the data directory is, use a SQL client and run show data_directory;
to find out.
If you do want to restart the service completely then do this as you would with any other Windows service through the control panel. Alternatively you can do that on the command line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With