Parameter changes not effective

When we change a parameter, but can't see the effect, there are quite a few possible reasons. Some parameters need a server restart. These are marked in the configuration file as follows:

# (change requires restart)

Then, there are parameters that can be set by a reload of the configuration file after making changes in the file. Reloading the parameters can be done using the following command:

pg_ctl reload

The same can be achieved by executing at psql:

SELECT pg_reload_conf();

We can know whether a server restart is required for a parameter change to take effect by querying pg_settings:

postgres=# SELECT DISTINCT  context FROM pg_settings;
  context   
------------
 backend
 user
 internal
 postmaster
 superuser
 sighup

If the context ...

Get PostgreSQL for Data Architects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.