Reloading the server configuration files
Some PostgreSQL configuration parameters can only be changed by reloading the entire configuration file.
How to do it…
On all platforms, there is a specific command to reload the server. All of these are listed as follows:
Here is the command for Ubuntu and Debian:
pg_ctlcluster 9.4 main reload
For Red Hat/Fedora, the command is as follows:
service postgresql reload
You can also use the following command:
pg_ctl -D /var/lib/pgsql/data reload
For Solaris, this is the command:
pg_ctl -D /var/lib/pgsql/data reload
For Mac OS, the command is as follows:
pg_ctl -D /var/lib/pgsql/data reload
Here is the command for FreeBSD:
pg_ctl -D /var/lib/pgsql/data reload
You can reload the configuration files while still connected to PostgreSQL. This can be done from the command line as follows, if you are a superuser:
postgres=# select pg_reload_conf();
The output is rather short:
pg_reload_conf ---------------- t
This function is also often executed from an admin...