Reloading server configuration
In this recipe, we will talk about the command that can be used to reload the server configuration and its parameters.
Getting ready
If any of the server parameters come into effect after reloading the server configuration files, such as postgresql.conf
, then we need to reload the server configuration using the reload option of the pg_ctl
command.
How to do it...
We can use the following command to reload the server configuration on Red Hat-based Linux and Unix distributions:
pg_ctl -D /var/lib/pgsql/9.6/data reload
You can also reload the configuration using the pg_reload_conf
function while still being connected to PostgreSQL .The usage of the pg_reload_conf
function is mentioned as follows:
postgres=# select pg_reload_conf();
How it works...
The reload mode of the pg_ctl
command is used to send the postgres process a SIGHUP
signal, which in turn causes it to reload its configuration files such as postgresql.conf
and pg_hba.conf
. The benefit...