官术网_书友最值得收藏!

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 of this mode is that it allows the configuration changes to be reloaded without requiring a complete restart of the PostgreSQL server to come into effect.

In this mode, PostgreSQL will send a SIGHUP signal to each child process, including the utility processes such as autovacuum, bgwriter, stats collector, and so on, to get the new settings from the latest configuration settings.

主站蜘蛛池模板: 黄骅市| 渝中区| 天全县| 和静县| 清镇市| 滨州市| 长治市| 浦城县| 革吉县| 利川市| 康乐县| 徐闻县| 沿河| 齐河县| 余庆县| 青铜峡市| 南昌市| 宁陵县| 辰溪县| 宜宾县| 连平县| 万州区| 深圳市| 张家界市| 鲁山县| 瑞昌市| 方山县| 宜宾县| 赤壁市| 临朐县| 原平市| 读书| 正宁县| 加查县| 南召县| 晋江市| 镇巴县| 文昌市| 永吉县| 旺苍县| 梨树县|