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 ...

Get PostgreSQL 9 Administration Cookbook - Second Edition 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.